Sandeep
Sandeep

Reputation: 61

Request a Delivery Receipt and Read Receipt using System.Net.Mail

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)?

Upvotes: 6

Views: 5663

Answers (1)

lamer lamer
lamer lamer

Reputation: 345

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

Upvotes: 14

Related Questions