我正在尝试让经典的 ASP 页面与 Outlook(Microsoft Web 电子邮件)SMTP 中继一起使用。我收到以下错误:
CDO.Message.1 error '80040213'
The transport failed to connect to the server.
我的代码看起来像
dim objEmail
Set objEmail = Server.CreateObject("cdo.message")
objEmail.To = list
objEmail.From = "xyz@abc.com"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpServer
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = username
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = password
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 587
objEmail.Configuration.Fields.Update
objEmail.Send
我用 GMAIL 进行了测试,这个东西片段可以很好地使用它。我想我在 Outlook SMTP 的配置中遗漏了一些东西