我想从我的 vbscript 代码发送一封电子邮件,下面的代码在我的机器上正常工作,但是当我改变我的机器时,代码不再能够发送电子邮件。运行期间没有发生错误或问题,但没有发送/发送电子邮件。有没有其他人遇到过这样的问题?
Set objMessage = CreateObject("CDO.Message")
With objMessage
.From = SendFrom
.To = SendTo
.Subject = "Subject"
.Textbody = ""
.HTMLBody = "<b>Body</b>"
With .Configuration.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "SMTP.Gmail.Com"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "Username"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "Password"
.Update
End With
.Send
End With