码迷,mamicode.com
首页 > 其他好文 > 详细

VBS发送邮件-1

时间:2015-05-01 21:15:02      阅读:185      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!