How to check if an email was sent successfully?

4

I am trying to verify that an email sent from my application is sent successfully, wondering if the recipient receives it or not (full mailbox, invalid email, there). For what I researched, there is deliverynotificationoptions that the game should give me information if the email was sent or not.

mail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
mail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnSuccess;
mail.DeliveryNotificationOptions = DeliveryNotificationOptions.Delay;

Then I try to send the email:

try
{
   SmtpCliente.Send(mail);
}
catch (Exception ex)
{
   return ex.Message;
}

The truth is that I can not get this information ... Is there another way to get this information, or is it really impossible?

    
asked by anonymous 28.07.2014 / 10:59

1 answer

3

After executing the SmtpCliente.Send(mail); method, if no exception occurs, this means that the email was sent to the SMTP server. After this, there is no guarantee that your email will be delivered to the recipient. Check out this link that stackoverflow in English.

Note that even the message.DeliveryNotificationOptions = System.Net.Mail.DeliveryNotificationOptions.OnSuccess; event does not guarantee that your message will be received because the recipient may not send you a reply email and have received your message.

    
28.07.2014 / 13:09