Function Sendmail (SMTPSERVER, SENDER, MAILTO, SUBJECT, MSG) 'is a function that can be called directly in the program.
DIM JMAIL
'on Error Resume Next
'Waiting for function expansion
Set jmail = server.createObject ("jmail.smtpmail")
Jmail.lazysend = true 'This property is to put the message into the buffer until any error message is not issued.
JMail.Charset = "Euc-KR" "Set the character set of the message, default is" US-ASCII "general Chinese with" GB2312 "
Jmail.conteType = "text / html" 'This message is set, the default is "text / place" to set any conditions you need. 'You want to send HTML information, change this header as "text / html"
Jmail.serveraddress = SMTPSERVER 'Server address. Can have a lot of Server addresses, follow the port number
Jmail.Sender = sender 'mailing address
Jmail.Subject = Subject 'title.
Jmail.addrecipient mailto 'joins a recipient
Jmail.Body = MSG 'Ubbcode (HTMLENCode (MSG)) E-mail
Jmail.Priority = 1 'The priority of the message can range from 1 to 5. The bigger the priority is about high, for example, 5 highest, 1 lowest, generally set to 3
JMail.AddHeader "Originating-IP", Request.ServerVariables ( "REMOTE_ADDR") 'addheader added a header' remote_addr IP address of the requesting machine JMail.Execute 'message is sent to the execution SERVERset jMail = nothing if err then' detected SendMail = err.descriptionerr.cleareLsesendmail = "ok" end ifend function script>
<% 'Call Description: strHTML = "