创建txt文件,将一下代码复制到里面,后缀名改为.vbs
创建计划任务,定时执行(不会的百度或者留言)
准备好对应的excel 和背景图,excel有三列,姓名生日和邮箱
Function sendEmail(nameVal, myBirthdayVal, myEmailVal, content1, content2)
OnErrorResumeNext
NameSpace="http://schemas.microsoft.com/cdo/configuration/"
Set Email = CreateObject("CDO.Message")
Email.From ="2323@f-2323.com.cn"
Email.To = myEmailVal
Email.Subject =""
Email.AddAttachment "D:\1.jpg"
Email.htmlBody ="<body background=‘cid:1.jpg‘>"&"<h1>"& nameVal &"</h1>"& myBirthdayVal& content1& content2 &"</body>"
With Email.Configuration.Fields
.Item(NameSpace&"sendusing")=2
.Item(NameSpace&"smtpserver")="232.23423232.com.cn"
.Item(NameSpace&"smtpserverport")=25
.Item(NameSpace&"smtpauthenticate")=1
.Item(NameSpace&"sendusername")="232@f-232.com.cn"
.Item(NameSpace&"sendpassword")="232233"
.Update
EndWith
Err.Clear
Email.Send
<span style="color:b
原文:http://441540598.blog.51cto.com/3014627/1899776