标题: [问题求助] VBS发邮件出现错误553 authentication is required [打印本页]
作者: kevinll 时间: 2013-5-3 14:22 标题: VBS发邮件出现错误553 authentication is required
用下面的脚本发邮件(相关参数已赋值),出现错误
553 authentication is required- NameSpace = "http://schemas.microsoft.com/cdo/configuration/"
- set Email = CreateObject("CDO.Message")
- Email.From = "发件人地址"
- Email.To = "收件人地址"
- Email.Subject = "测试"
- x="内容文件的绝对路径"
- y="附件绝对路径"
- Set fso=CreateObject("Scripting.FileSystemObject")
- Set myfile=fso.OpenTextFile(x,1,Ture)
- c=myfile.readall
- myfile.Close
- Email.Textbody = c
- Email.AddAttachment y
- with Email.Configuration.Fields
- .Item(NameSpace&"sendusing") = 2
- .Item(NameSpace&"smtpserver") = "邮箱服务器"
- .Item(NameSpace&"smtpserverport") = 25
- .Item(NameSpace&"smtpauthenticate") = 1
- .Item(NameSpace&"sendusername") = "用户名"
- .Item(NameSpace&"sendpassword") = "密码"
- .Update
- end with
- Email.Send
- Set Email=Nothing
复制代码
我已经设置了用户名和密码啊,邮箱服务器是smtp.163.com,操作系统是WIN 2003 SERVER,需要配置哪里吗?防火墙没开。
作者: kevinll 时间: 2013-5-3 14:46
换成了QQ邮件服务器,出现错误:
503 Error: need EHLO and AUTH first !
欢迎光临 批处理之家 (http://www.bathome.net/) |
Powered by Discuz! 7.2 |