【问题标题】:Not receiving Delivery notifications in CDO在 CDO 中未收到交付通知
【发布时间】:2017-05-05 14:11:17
【问题描述】:

我有一个功能,它使用 CDO 发送电子邮件,请求在邮件到达收件人时提供送达回执。

我使用以下代码:

CDO.Message msg = new CDO.Message();
CDO.Configuration conf = new CDO.Configuration();

conf.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"].Value = 1;
conf.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserver"].Value = txtHost.Text;
conf.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserverport"].Value = 25;
conf.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"].Value = txtPass.Text;
conf.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"].Value = txtUser.Text;

conf.Fields.Update();

msg.Configuration = conf;

msg.To       = txtTo.Text;
msg.From     = txtFrom.Text;
msg.Subject  = txtSubject.Text+" " + DateTime.Now;
msg.HTMLBody = txtBody.Text;
msg.BodyPart.Charset = "utf-8";

msg.DSNOptions = CdoDSNOptions.cdoDSNSuccessFailOrDelay;
msg.Fields.Update();
msg.Send();

现在,这在我的本地机器上和我的网络服务器上运行良好,但是当在生产服务器上与另一个邮件服务器一起使用时,没有收到送达收据。

我相信我的邮件服务器和生产邮件服务器之间一定有区别,但我不知道它到底是什么。

所以如果有人以前遇到过这样的问题,请告诉我该怎么做。

【问题讨论】:

    标签: asp.net email


    【解决方案1】:

    它几乎可以在您的本地计算机上运行,​​因为您将其交付给自己。通过指定sendUsingPort 在世界上锻炼you have to explicitly tell CDO not to deliver to the local smtp 进行中继

    conf.Fields["ttp://schemas.microsoft.com/cdo/configuration/sendusing"].Value = 2

    【讨论】:

      猜你喜欢
      • 2018-10-09
      • 1970-01-01
      • 2022-01-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-30
      • 2014-05-21
      相关资源
      最近更新 更多