function sendemail(sname,mailbody)
sname="webmaster@sjcww.com"
mailbody=li
dim jmail
err.clear
on error resume next
set jmail=server.CreateObject("jmail.message")
if err.number<>0 then
sendmail=0 : err.clear : exit function
end if
smtp="mail.sjcww.com"
'设置发邮件服务器
jmail.serveraddress=smtp
jmail.silent=true
jmail.logging=true
jmail.charset="gb2312"
jmail.contenttype="text/html"
'设置发件人信箱
jmail.sender=sname
'设置发信人名字
jmail.FromName=name1
jmail.priority=1
'设置收信人信箱
jmail.AddRecipient sname
'设置主题
jmail.subject="我要定购"
'设置信件内容
jmail.body=mailbody
'设置发件信箱用户名
jmail.mailserverusername= "webmaster"
'设置发件信箱秘码
jmail.mailserverpassword="***********"
'开始发送
jmail.send smtp
jmail.Close
sendmail=1
set jmail=nothing
end function