Sub SendAction(subject, email, sender, content)
Set JMail = Server.CreateObject("JMail.Message")
JMail.Charset = "gb2312" ' 邮件字符集,默认为"US-ASCII"
JMail.From = strMailUser ' 发送者地址
JMail.FromName = sender' 发送者姓名
JMail.Subject =subject
JMail.MailServerUserName = strMailUser' 身份验证的用户名
JMail.MailServerPassword = strMailPass ' 身份验证的密码
JMail.Priority = 3
JMail.AddRecipient(email)
JMail.Body = content
JMail.Send(strMailAddress)
End Sub
strSubject = "邮件主题"
strContent = "邮件内容"
strSender ="发送人"
strEmail = "446881654@qq.com" '这是收信的地址,可以改为其它的邮箱箱
strMailAddress = "mail.hfyefan.com" '‘发件服务器地址 例:smtp.163.com(为163服务器地址)
strMailUser = "web@hfyefan.com" '我司企业邮局用户名
strMailPass = "hfyefan" '邮局用户密码
On Error Resume Next
Call SendAction (strSubject,strEmail,strSender,strContent)
response.write "<script>alert('发送成功,请耐心等待客服的联系!')';</script>"