vbs sendmail发邮件带附件方法
时间:2020-07-22 13:47 来源/作者:VBS代码网
-
NameSpace = "http://schemas.microsoft.com/cdo/configuration/"
-
Set Email = CreateObject("CDO.Message")
-
Email.From = "zzzevazzz@21cn.com"
-
Email.To = "zzzevazzz@126.com"
-
Email.Subject = "Test sendmail.vbs"
-
Email.Textbody = "OK!"
-
Email.AddAttachment "C:\foo.zip"
-
With Email.Configuration.Fields
-
.Item(NameSpace&"sendusing") = 2
-
.Item(NameSpace&"smtpserver") = "smtp.21cn.com"
-
.Item(NameSpace&"smtpserverport") = 25
-
.Item(NameSpace&"smtpauthenticate") = 1
-
.Item(NameSpace&"sendusername") = "zzzevazzz"
-
.Item(NameSpace&"sendpassword") = "ph4nt0m!"
-
.Update
-
End With
-
Email.Send
相关文章
热门资讯