How to confirm that mail has been delivered or not?

后端 未结 6 1825
闹比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:43

    You can set the DeliveryNotificationOptions property of the MailMessage to OnSuccess.

    There's more info on this here: http://msdn.microsoft.com/en-us/library/system.net.mail.deliverynotificationoptions.aspx

    and here: http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.deliverynotificationoptions.aspx

    As has been pointed out in the comments, this method is not 100% reliable. It's just one option.

提交回复
热议问题