VBS发送邮件-1


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

posted @ 2015-05-01 20:42  Eric-Liu  阅读(804)  评论(0编辑  收藏  举报