sub SendMail(Receiver, CC, Sender, UserName, Password, Subject, Content, MailServer)
Set jmail = Server.CreateObject("JMAIL.Message") '建立发送邮件的对象
jmail.silent = true '屏蔽例外错误,返回FALSE跟TRUE两值j
mail.logging = true '启用邮件日志
jmail.Charset = "GB2312" '邮件的文字编码为国标
jmail.ContentType = "text/html" '邮件的格式为HTML格式
jmail.AddRecipient Receiver '邮件收件人的地址
jmail.AddRecipientCC CC '邮件抄送者的地址
jmail.From = Sender '发件人的E-MAIL地址
jmail.MailServerUserName = UserName '登录邮件服务器所需的用户名
jmail.MailServerPassword = Password '登录邮件服务器所需的密码
jmail.Subject = Subject '邮件的标题
jmail.Body = Content '邮件的内容
'jmail.Prority = 1 '邮件的紧急程序,1 为最快,5 为最慢, 3 为默认值
jmail.Send(MailServer) '执行邮件发送(通过邮件服务器地址)
jmail.Close() '关闭对象
end sub
if request("action")="SendMail" then
strReceiver = "8888@vip.163.com"
strCC = "stone@hotmail.com"
strSender = "stone@163.com"
strUserName = "stone@163.com"
strPassword = "888888"
strSubject = "网站订单--"&now()
strContent = "产品:"&request("Product")&"<br>公司名称:"&request("CompName")&"<br>公司电话:"&request("Phone")&"<br>传真号码:"&request("Fax")&"<br>电子邮件:"&request("Email")&"<br>联系人:"&request("TrueName")&"<br>联系地址:"&request("Address")&"<br>备注:"&request("Other")&""
strMailServer = "smtp.163.com"
call SendMail(strReceiver, strCC, strSender, strUserName, strPassword, strSubject, strContent, strMailServer)
response.Write("<script>alert('订单发送成功');window.location.href='Home.asp'</script>")
end if
Set jmail = Server.CreateObject("JMAIL.Message") '建立发送邮件的对象
jmail.silent = true '屏蔽例外错误,返回FALSE跟TRUE两值j
mail.logging = true '启用邮件日志
jmail.Charset = "GB2312" '邮件的文字编码为国标
jmail.ContentType = "text/html" '邮件的格式为HTML格式
jmail.AddRecipient Receiver '邮件收件人的地址
jmail.AddRecipientCC CC '邮件抄送者的地址
jmail.From = Sender '发件人的E-MAIL地址
jmail.MailServerUserName = UserName '登录邮件服务器所需的用户名
jmail.MailServerPassword = Password '登录邮件服务器所需的密码
jmail.Subject = Subject '邮件的标题
jmail.Body = Content '邮件的内容
'jmail.Prority = 1 '邮件的紧急程序,1 为最快,5 为最慢, 3 为默认值
jmail.Send(MailServer) '执行邮件发送(通过邮件服务器地址)
jmail.Close() '关闭对象
end sub
if request("action")="SendMail" then
strReceiver = "8888@vip.163.com"
strCC = "stone@hotmail.com"
strSender = "stone@163.com"
strUserName = "stone@163.com"
strPassword = "888888"
strSubject = "网站订单--"&now()
strContent = "产品:"&request("Product")&"<br>公司名称:"&request("CompName")&"<br>公司电话:"&request("Phone")&"<br>传真号码:"&request("Fax")&"<br>电子邮件:"&request("Email")&"<br>联系人:"&request("TrueName")&"<br>联系地址:"&request("Address")&"<br>备注:"&request("Other")&""
strMailServer = "smtp.163.com"
call SendMail(strReceiver, strCC, strSender, strUserName, strPassword, strSubject, strContent, strMailServer)
response.Write("<script>alert('订单发送成功');window.location.href='Home.asp'</script>")
end if