Set jmail = CreateObject("JMAIL.Message")
jmail.FromName = "SDA information management system"
jmail.silent = true
jmail.logging = true
jmail.Charset = "GB2312"
jmail.ContentTransferEncoding = "text/html"
jmail.AddRecipient "clark.huang@quan.com"
jmail.From = "sda@quan.com"
jmail.MailServerUserName = "emilie" '登录邮件服务器所需的用户名
jmail.MailServerPassword = "emilieliao" '登录邮件服务器所需的密码
jmail.Priority = 1
jmail.Subject = "Weekly Report of TE"
jmail.Body = ""
jmail.AppendHtml("<html><body><font face='Arial'>")
jmail.AppendHtml("Dear TE Leader,<br><br> This is the weekly report of week "&j&". See the attach file for more information.")
jmail.AppendHtml("</font></body></html>")
cid = jmail.AddAttachment("C:\Documents and Settings\Administrator\My Documents\"&Year(Now)&" weeklyreport of week "&j&".xls",TRUE)
jmail.Send("SDASRV")
jmail.Close
[此贴子已经被作者于2007-7-18 15:09:48编辑过]