function Sendmail (mailtoaddress, mailtoname, subject, mailbody, fromname, mailfrom)
'function parameter description (recipient address, Recipient Name (optional), topic, mail content, sender name (optional), sender address)
'on error resume next
dim jmail, MailServer, flag
set jmail = server. createobject ("jmail. message ")
If err then
Sendmail = false
err. clear
exit function
end if
jmail. charset = "gb2312" 'email encoding
jmail. silent = true
jmail. contenttype = "text/html" 'mail body format
MailServer = "smtp.126.com" 'is the SMTP server used to send emails
jmail. mailserverusername = "xiaonan126" 'logon username/Note: Enter the email account you applied for in 163
jmail. mailserverpassword = "840629" 'logon password/Note: enter the password of your 163 email account
jmail. maildomain = "126.com" 'domain name (if you use a user name such as" name@domain.com ", specify domain.com), optional
jmail. addrecipient mailtoaddress, mailtoname 'recipient's email address and recipient's name
jmail. subject = subject 'topic
jmail. appendhtml (mailbody)
jmail. fromname = fromname 'sender's name
jmail. from = mailfrom 'sender email
jmail. priority = 1' mail level, 1 is urgent, 3 is normal, 5 is low
flag = jmail. send (MailServer)
if flag then
Sendmail = true
else
Sendmail = false
end if
jmail. close
set jmail = nothing
If sendmail = true then
response. write ("")
else
response. write ("")
end if
end function
%>