<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<%
dim message,mail,contact
message="66666666"        '接收过来的表单值
mail="275194004@qq.com"
contact="888888888"
'==================================================
' 参数设置开始
myemail="275317590@qq.com"    '用来接收邮件的邮箱,可以与SMTP服务器发信邮箱不同
smtpserver ="smtp.126.com"    '发送邮件所使用的SMTP服务器，例如smtp.126.com
smtpuser ="lwl8143736"   '与SMTP服务器对应的邮箱用户名
smtppwd ="8143736"   '与SMTP服务器对应的邮箱密码
smtpemail ="lwl8143736@126.com"   'SMTP服务器发信邮箱，与发送服务器对应
' 参数设置结束
'==================================================

sendname = "某某人"  '发件人名字
myemail="275317590@qq.com"  '收件人邮箱
zhuti = "网站有新留言！"    '邮件标题

mailbody="<strong>客户留言内容：</strong>"&message&"</br>"&"<strong>客户邮件地址：</strong>"&myemail&"</br>"&"<strong>客户联系电话：</strong>"&contact   '内容部分1，可使用变量

if sendname <> "" and myemail <> "" then
set jmail= server.CreateObject ("Jmail.message")  '调用Jmail组件
jmail.Silent = true
jmail.Charset = "utf-8"
JMail.ContentType = "text/html"
'=================================
'调用变量内容
jmail.From = smtpemail
jmail.FromName = sendname  
jmail.ReplyTo = smtpemail
jmail.Subject = zhuti   
jmail.AddRecipient myemail
jmail.Body = mailbody    
jmail.MailServerUserName = smtpuser
jmail.MailServerPassWord = smtppwd

isgo = jmail.Send(smtpserver)   '发送邮件
'=================================
'if isgo then
'msg="发送成功"
'else
'msg = "发送失败，请检查参数"
'end if
jmail.Close
set jmail = nothing
end if

%>
</body>
</html>
