Home > Software engineering >  How do I know if a sent email was delivered using c# SmtpClient and MailMessage?
How do I know if a sent email was delivered using c# SmtpClient and MailMessage?

Time:11-30

How do I know if a sent email was delivered using C# SmtpClient and MailMessage? Is there a way to get a response back?

CodePudding user response:

Practical answer: no. Technical answer: it depends and it's not worth it. Very well explained here: Delivery Notification in SMTP.

Also, I think your system shouldn't take on the responsibility of checking if the email was delivered or not to the user. Just let the servers handle that. There could be a million reasons why an email didn't go through or arrived at spam or made it a few moments, minutes, hours later.

Just make sure your sending method ends well. If you're using an external provider, just check you get a successful response from them (even in those cases, you might get a 200 response and they might fail for some weird reason to deliver the email).

  •  Tags:  
  • c#
  • Related