[英]email via SMTP - Outlook and Powershell OK, but VBscript/CDO does not work
我正在尝试通过远程SMTP发送电子邮件:端口25,无身份验证。 我有这个脚本,它给我80040213错误(“传输无法连接到服务器”)。 但是,当我尝试使用Outlook或Powershell中的相同参数时,它可以工作。 我用谷歌搜索了...,但找不到解决方案。 欢迎任何建议。 谢谢。
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "CDO test"
objMessage.From = "person@firm.com"
objMessage.To = "person@firm.com"
objMessage.TextBody = "This is a test email."
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "<SMTPserver>"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
objMessage.Send
好。 终于我找到了。 McAfee Enterprise阻止某些应用程序通过端口25进行通信,以防止出现“大量电子邮件蠕虫”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.