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

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

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

if sendname <> "" and email <> "" 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 = email
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

%>