首页 > 其他 > 详细

VBS发送邮件-1

时间:2015-05-01 21:13:45      阅读:291      评论:0      收藏:0      [点我收藏+]


Set objMail = Server.CreateObject("CDO.Message")

Set objCDOSYSCon = Server.CreateObject("CDO.Configuration")

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") =2

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver")= "smtp.163.com" ‘邮件服务器

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = ""‘用户名

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = ""‘密码

objCDOSYSCon.Fields.Update

Set objMail.Configuration = objCDOSYSCon

‘‘系统配置结束
objMail.From = ""‘‘发送人

objMail.Subject = "网站客户提交信息" ‘‘标题

objMail.To = ""‘‘收件人

objMail.HtmlBody ="发送内容测试"‘发送内容。

objMail.Send

Set objMail = Nothing

Set objCDOSYSCon = Nothing

VBS发送邮件-1

原文:http://www.cnblogs.com/cnLiou/p/4471120.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!