VBS脚本发邮件

 

 

NameSpace = "http://schemas.microsoft.com/cdo/configuration/"

set Email = CreateObject("CDO.Message")

Email.From = "zhao.bin.930@163.com"

Email.To = "zhaob@huilan.com"

Email.Subject = "test"

Email.Textbody = "OK!"

with Email.Configuration.Fields

    .Item(NameSpace&"sendusing")            = 2

    .Item(NameSpace&"smtpserver")           = "smtp.163.com"

    .Item(NameSpace&"smtpserverport")     = 25

    .Item(NameSpace&"smtpauthenticate") = 1

    .Item(NameSpace&"sendusername")     = "zhao.bin.930"

    .Item(NameSpace&"sendpassword")      = "zhaobin163"

    .Update

end with

Email.Send

set Email = nothing

posted @ 2013-10-17 13:57  宇凡的天  阅读(156)  评论(0编辑  收藏  举报