<%
dim tSubject_21it,tHtml_21it,EmailAddress_21it,FromUrl_21it

tSubject_21it =TRIM(Request.Form("tSubject_21it"))
tHtml_21it=TRIM(Request.Form("tHtml_21it"))
EmailAddress_21it=TRIM(Request.Form("EmailAddress_21it"))
FromUrl_21it=TRIM(Request.Form("FromUrl_21it"))


 if  tSubject_21it<>"" and EmailAddress_21it<>"" then 

dim CLStr,msg,mailserver,username,password
CLStr=Chr(13) & Chr(10)

mailserver="mail.21it.com"
username="jmail@21it.com"				    
password="jmail"							

Set msg = Server.CreateObject("JMail.Message")
msg.silent = true
msg.Logging = true
msg.ContentType = "text/html"
msg.Charset = "gb2312"
msg.MailServerUserName = username
msg.MailServerPassword = password   
msg.From = username    
msg.FromName = username
msg.AddRecipient (EmailAddress_21it)
msg.Subject = tSubject_21it

msg.Body = "<html>"
msg.Body =msg.Body&"<head>"&CLStr
msg.Body =msg.Body&"<meta http-equiv='Content-Type' content='text/html; charset=gb2312'/>"&CLStr
msg.Body =msg.Body&"<title>"& tSubject_21it &"</title>"&CLStr
msg.Body =msg.Body&"<style type='text/css'>body,td,th {font-size: 12px;}</style></head>"&CLStr
msg.Body =msg.Body&"<body>"&CLStr

msg.Body = msg.Body&tHtml_21it &CLStr
msg.Body = msg.Body&"<center><br><br>========================================================<br>"&CLStr
msg.Body = msg.Body&"本邮件是通过江西世纪网络邮局系统在线发送的,请勿直接回复!<br>"&CLStr
msg.Body = msg.Body&"专业的网站建设和网络营销策划机构——江西世纪网络（<a href='http://www.21it.com' target=_blank>http://www.21it.com/</a>)祝您天天开心!</center>"

msg.Body = msg.Body&"</body>"&CLStr
msg.Body = msg.Body&"</html>"&CLStr

msg.Send (mailserver)
msg.close
set msg = nothing
	  response.write "<script language='javascript'>alert('发送成功！谢谢！');document.location='"&FromUrl_21it&"';</script>"

else
	  response.write "<script language='javascript'>alert('参数错误！发送失败！');document.location='"&FromUrl_21it&"';</script>"
end if 
%>
