日期:2014-05-16 浏览次数:20981 次
Set myMail=server.CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="xiayuxuan91@163.com"
myMail.To="253305452@qq.com"
myMail.TextBody="This is a message."
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'远程 SMTP 服务器的 IP 或名称
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
="smtp.163.com"
'服务器端口
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
=25
myMail.Configuration.Fields.Item _
(" http://schemas.microsoft.com/cdo/configuration/sendusername")_
="xiayuxuan91" '用户名
myMail.Configuration.Fields.Item _
(" http://schemas.microsoft.com/cdo/configuration/sendpassword")_
="**************" '密码
myMail.Configuration.Fields.Item _
(" http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")_
=1
myMail.Configuration.Fields.Item _
(" http://schemas.microsoft.com/cdo/configuration/smtpusessl")_
=false
myMail.Configuration.Fields.Update
myMail.Send