使用 CDO 发送测试电子邮件消息

此脚本使用 CDO 发送测试电子邮件消息。

Visual Basic
Set objEmail = CreateObject(“CDO.Message”)
set objConf = CreateObject(“CDO.Configuration”)

Set objFlds = objConf.Fields
With objFlds
.Item(“http://schemas.microsoft.com/cdo/configuration/sendusing”) = 2
.Item(“http://schemas.microsoft.com/cdo/configuration/smtpserver”) = “XXX-ex100″
.Item(“http://schemas.microsoft.com/cdo/configuration/smtpserverport”) = 25
‘.Item(“http://schemas.microsoft.com/cdo/configuration/smtpauthenticate”) = cdoBasic
.Update
End With
Set objEmail.Configuration = objConf

objEmail.From = “ron.nixon@fastmail.us”
objEmail.To = “users.name@abc.com”
objEmail.Subject = “All done!”
objEmail.Textbody = “…here you go…”
objEmail.Addattachment “C:\directory name of file\filename”
objEmail.Send

Latest posts by Exchange中文站 (see all)
发布于: 浏览:4072 次

还没有评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据