|
|
用的代码就是广为流传的例子:- Set cdo = CreateObject("CDO.Message")
- strCfg = "http://schemas.microsoft.com/cdo/configuration/"
- With cdo
- .Sender = "发送者邮件地址"
- .From = "发送者邮件地址"
- .To = "接收者邮件地址"
- .Fields("urn:schemas:mailheader:X-Priority") = 1
- .Fields.Update
- .Subject = "邮件标题"
- .TextBody = "邮件内容"
- .Configuration(strCfg & "SendUsing") = 2
- .Configuration(strCfg & "smtpserver") = "发送邮件服务器地址"
- .Configuration.Fields.Update
- .Send
- End With
复制代码 在某个Win2003服务器上运行时报错信息如下:
Test.vbs(70, 3) (null): The message could not be sent to the SMTP server. The transport error code was 0x80070057. The server response was notavailable
应该不是SMTPserver的地址没写对,否则会报另一个错误。Google搜索了一下,有人说需要增加以下配置:
Item(MS_Space&"smtpauthenticate")
Item(MS_Space&"sendusername")
Item(MS_Space&"sendpassword")
但是我在那个邮件系统中没有自己的账号。请问在这种情况下该如何解决此问题呢?
PS: 因为是服务器,暂时不考虑第三方工具。 |
|