TA的每日心情 | 郁闷 2018-11-15 14:58 |
---|
签到天数: 2 天 连续签到: 2 天 [LV.1]测试小兵
|
Call SendMail()
Function SendMail()
'函数参数说明("收件人地址","收件人姓名(可选)","主题","邮件内容","发件人姓名(可选)","发件人地址")
'on error resume next
Set JMail = CreateObject("JMail.Message")
JMail.Charset = "gb2312" '邮件编码
JMail.silent = True '出错时是否继续执行
JMail.ContentType = "text/html" '邮件正文格式
JMail.MailServerUserName = "123123@163.com" '登录用户名
JMail.MailServerPassWord = "123123" '登录密码
JMail.MailDomain = "mail.163.com" '域名(如果用"name@domain.com"这样的用户名登录时,请指明domain.com),可选
JMail.AddRecipient "123123@qq.com", "test" '收信人邮箱和收信人名称
JMail.Subject = "测试" '主题
JMail.Body = "A nice picture if you can read HTML-mail."
JMail.FromName = "123123" '发信人姓名
JMail.From = "123123@163.com" '发信人Email
JMail.Priority = 1 '邮件等级,1为加急,3为普通,5为低级
JMail.Send("mail.163.com") '用来发送邮件的SMTP服务器
JMail.Close
Set JMail = Nothing
End Function |
|