How to confirm that mail has been delivered or not?

后端 未结 6 1830
闹比i
闹比i 2020-11-28 11:20

Below is my coding, just have a look at it

System.Net.Mail.MailMessage oMail = new System.Net.Mail.MailMessage();
System.Net.Mail.SmtpClient smtp = new Syste         


        
6条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-28 11:46

    You can't. Since you use SMTP, in general case, it's impossible to tell whether delivery succeeded or not. Read SMTP specification. Mail is routed while being delivered, so:

    1. There's no guarantee your message is sent as soon as you call smtp.Send().
    2. Since SMTP is routed, you can't be sure that some node on the route won't fail with delivery to uplink.

提交回复
热议问题