【问题标题】:Delivery Status Notification & Read Receipt in SMTPSMTP 中的传递状态通知和阅读回执
【发布时间】:2015-01-19 03:31:54
【问题描述】:

如何在 SMTP 中请求传递状态通知 我该如何解析它? 我用这个作为

mailmessage.DeliveryNotificationOptions = DeliveryNotificationOptions.OnSuccess;

邮寄成功,但我没有收到任何递送状态。

谁能找出原因?

通过使用

message.Headers.Add("Disposition-Notification-To", "emailid");

收到已读回执, 可以在原邮件中设置已读回执的内容吗?

提前感谢您的帮助...!!!

【问题讨论】:

标签: c# asp.net asp.net-mvc email


【解决方案1】:

我可以通过添加 smtp.DeliveryMethod = SmtpDeliveryMethod.Network; 来做到这一点 像这样的代码:

            mm.Headers.Add("Disposition-Notification-To", smtp_user);
            mm.Headers.Add("Return-Receipt-To", smtp_user);

            SmtpClient smtp = new SmtpClient(smtp_address, smtp_port);
            smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
            smtp.Credentials = new NetworkCredential(smtp_user, smtp_password);
            smtp.EnableSsl = smtp_ssl;

            smtp.Send(mm);

【讨论】:

    猜你喜欢
    • 2012-09-29
    • 1970-01-01
    • 1970-01-01
    • 2020-10-10
    • 2015-06-03
    • 2015-12-20
    • 2019-01-04
    • 1970-01-01
    • 2017-10-05
    相关资源
    最近更新 更多