使用System.Net.Mail请求交货收据和已读回执

时间:2021-08-28 18:14:00

We are using System.Net.Mail namespace in our application to send emails to the users. Is there a way we can request a delivery receipt and read receipt options when sending emails using the above namespace (also without using any third party libraries)?

我们在应用程序中使用System.Net.Mail命名空间向用户发送电子邮件。有没有办法在使用上述命名空间(也不使用任何第三方库)发送电子邮件时请求送货收据和阅读收据选项?

1 个解决方案

#1


3  

  MailMessage SendMail = new MailMessage();
        //other code to configure to, from, subject, body etc...
  //for read receipt
  SendMail.Headers.Add ("Disposition-Notification-To", "email@gmail.com"); 
  //for delivery receipt
  SendMail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnSuccess

#1


3  

  MailMessage SendMail = new MailMessage();
        //other code to configure to, from, subject, body etc...
  //for read receipt
  SendMail.Headers.Add ("Disposition-Notification-To", "email@gmail.com"); 
  //for delivery receipt
  SendMail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnSuccess