【问题标题】:Error 80040211 when sending test email through ASP Classic通过 ASP Classic 发送测试电子邮件时出现错误 80040211
【发布时间】:2015-11-15 20:25:17
【问题描述】:

我在使用 ASP Classic 通过 Amazon SES 发送测试电子邮件时遇到问题。

  • 您可以在下面找到 testemail.asp 的代码
  • 我已将电子邮件地址 from@email.com 添加到我的 Amazon SES 验证发件人列表中
  • 我正在使用区域 EU West 1
  • 如您在 IIS 日志文件中所见,Web 服务器返回错误 80040211
  • 我已包含 Wireshark 的 SMTP 会话摘要。
  • 如您所见,SMTP 会话中没有 FROM,它在 EHLO 之后停止

testemail.asp

Dim iMsg, iConf, Flds
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

Const cdoSendUsingPort = 2

With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort 
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "email-smtp.eu-west-1.amazonaws.com"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic 
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "sendusername"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "sendpassword"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
.Update
End With

With iMsg
Set .Configuration = iConf
.To = "to@email.com"
.From = "from@email.com"
.Subject = "test email"
.TextBody = "test body"
.Send
End With

response.write("sent")

IIS 日志文件:

#Software: Microsoft Internet Information Services 7.5
#Version: 1.0
#Date: 2015-11-13 14:26:30
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
2015-11-13 14:26:30 ip GET /testemail.asp |33|80040211|- 80

Wireshark 输出:

SMTP    78  S: 220 Ready to start TLS
SMTP    64  C: STARTTLS
SMTP    161 S: 250 email-smtp.amazonaws.com | 250 8BITMIME | 250 SIZE 10485760 | 250 STARTTLS | 250 AUTH PLAIN LOGIN | 250 Ok
SMTP    75  C: EHLO computername
SMTP    141 S: 220 email-smtp.amazonaws.com ESMTP SimpleEmailService-1207622245 BXAQROhZb0x4duTeH4lz

【问题讨论】:

标签: asp-classic


【解决方案1】:

它不允许我在上面发表评论,所以我想把它放在这里。我遇到了类似的问题,并禁用了服务器上的 Windows 防火墙,它工作正常。几天前我不需要这样做,但一旦禁用防火墙,它就像一个魅力。

【讨论】:

    猜你喜欢
    • 2014-06-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-21
    • 2015-06-09
    • 2019-05-06
    相关资源
    最近更新 更多