
<%
sub sendmail
mailfoot="------------------- "&citytitle&" -------------------" & vbcrlf &"本邮件为系统自动发送，请不要直接回复。" 
mailserver=citymailsmtp
mailserverloginname=citymaillog
mailserverloginpass=citymailpass
mailuserdomain=citymaildns

'获取表单数据
fromname=cityname
frommail=citymaildns
toname=toname
tomail=tomail
mailtitle=mailtitle
mailbody=mailbody

dim JMail
set JMail=server.CreateObject("Jmail.message")

JMail.Silent=true
JMail.Charset = "gb2312"

JMail.FromName = fromname
JMail.from = frommail
JMail.AddRecipient tomail,toname
JMail.Subject = mailtitle
jmail.Body=mailbody & vbcrlf & vbcrlf & mailfoot

JMail.MailServerUserName = mailserverloginname
JMail.MailServerPassWord = mailserverloginpass
JMail.MailDomain = mailuserdomain
sendok=JMail.send(mailserver)

if sendok then
send_mail="ok"
else
send_mail="err"
end if

end sub%>
