C# 设置发送邮件的Deliverynotification和Readnotification
我向客户发送发票和警告/提醒,现在这些邮件应该标记为Deliverynotification和Readnotification。因此,我知道客户何时收到并阅读发票C# 设置发送邮件的Deliverynotification和Readnotification,c#,asp.net,email,C#,Asp.net,Email,我向客户发送发票和警告/提醒,现在这些邮件应该标记为Deliverynotification和Readnotification。因此,我知道客户何时收到并阅读发票 MailMessage email = new MailMessage(); email.Priority = MailPriority.Normal; email.DeliveryNotificationOptions = DeliveryNotificationOptions.OnSuccess; // Deliverynotif
MailMessage email = new MailMessage();
email.Priority = MailPriority.Normal;
email.DeliveryNotificationOptions = DeliveryNotificationOptions.OnSuccess; // Deliverynotification?
email.Attachments.Add(new Attachment(docDunPath));
email.Attachments.Add(new Attachment(docInvoicePath));
email.Subject = "-----------";
email.IsBodyHtml = true;
email.Body = MailText;
到目前为止一切正常,我只想设置收件人阅读邮件后自动回复的选项。因此,我可以肯定他看到了他的发票。因此,在意识到我使用了System.Net.Mail之后,我切换到了Microsoft.Exchange.WebServices,现在它运行得非常好
EmailMessage email = new EmailMessage(service);
email.IsDeliveryReceiptRequested = true;
email.IsReadReceiptRequested = true;