jmail|发送邮件
On error resume next
Dim JMail, contentId
Set JMail = Server.CreateObject("JMail.Message")
JMail.Charset = "gb2312"
JMail.From = "goaler@goalerCN.com"
JMail.FromName = "goaler"
JMail.Subject = "JMail自动发送的邮件"
JMail.MailServerUserName = "goaler@goalerCN.com"
JMail.MailServerPassword = "**********"
JMail.Priority = 3
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
FriendEmail="user@163.com"
JMail.AddRecipient(FriendEmail)
' 加入附件【变量filename:附件文件的绝对地址,确保用户IUSR_机器名有访问的权限】
' 【参数设置是(True)否(False)为Inline方式】
'contentId = JMail.AddAttachment (Server.MapPath("jmail.asp"), True)
MailBody = MailBody & "<html><head><META content=zh-cn http-equiv=Content-Language><meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312""><style type=text/css>BODY {FONT-SIZE: 9pt}</style></head><body>"
MailBody = MailBody & "邮件内容"
MailBody = MailBody & "</body></html>"
JMail.HTMLBody = MailBody
JMail.Body = "我们的邮件采用了HTML格式,但是您的邮件查看软件可能不支持。。。"
' 发送【调用格式:objJMail.Send([username:password@]SMTPServerAddress[:Port])】
'JMail.Send("mail.guxido.com")
JMail.Send("mail.goalerCN.com")
JMail.Close()
Set JMail = Nothing