1. 创建txt文件,将一下代码复制到里面,后缀名改为.vbs

  2. 创建计划任务,定时执行(不会的百度或者留言)

  3. 准备好对应的excel 和背景图,excel有三列,姓名生日邮箱



Function sendEmail(nameVal, myBirthdayVal, myEmailVal, content1, content2)


OnErrorResumeNext

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

Set Email = CreateObject("CDO.Message")

   Email.From ="[email protected]"

   Email.To = myEmailVal

   Email.Subject =""

   Email.AddAttachment "D:\1.jpg"

   Email.htmlBody  =""&"

"& nameVal &"

"& myBirthdayVal& content1& content2 &""

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")="[email protected]"

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

.Update

EndWith

   Err.Clear

   Email.Send