0
我想通過遠程SMTP發送電子郵件:端口25,沒有身份驗證。我有這個腳本,給了我80040213錯誤(「傳輸失敗連接到服務器」)。但是,當我嘗試使用來自Outlook或Powershell的相同參數時,它可以正常工作。我搜索了... ...但我找不到解決方案。 歡迎任何建議。謝謝。通過SMTP電子郵件 - Outlook和Powershell確定,但VBscript/CDO不起作用
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "CDO test"
objMessage.From = "[email protected]"
objMessage.To = "[email protected]"
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