I am developing an Asp.Net application, where I am sending a mail to the user's email address, if he forgets the password.
I want to check if the mail has been sent sucessfully or not. Is there any method to know that for sure.
EDIT
In case if an email id does'nt exists, then would I detect a failure.
You can use the DeliveryNotificationOptions to receive a receipt.
If you have a
MailMessage
object named mail, do this:The SmtpClient.Send method will raise an Exception if there's a problem sending. But beyond getting that message to the SMTP server, there's no way to know if it makes it to the destination from there.