在网上找一向邮箱自动发送邮件的代码,运行时提示错,请各位朋友看一下,我填写的内容对吗?该代码是否正确?- #automail.vbs
-
- NameSpace = "http://schemas.microsoft.com/cdo/configuration/"
- Set Email = CreateObject("CDO.Message")
- Email.From = "88888@qq.com"
- Email.To = "99999@qq.com"
- Email.Subject = "Test sendmail.vbs"
- Email.Textbody = "OK!"
- Email.AddAttachment "d:\012.txt"
- With Email.Configuration.Fields
- .Item(NameSpace&"sendusing") = 2
- .Item(NameSpace&"smtpserver") = "smtp.sina.com"
- .Item(NameSpace&"smtpserverport") = 25
- .Item(NameSpace&"smtpauthenticate") = 1
- .Item(NameSpace&"sendusername") = "88888"
- .Item(NameSpace&"sendpassword") = "123"
- .Update
- End With
- Email.Send
复制代码
|