<% 'By Dicky QQ: 25941Function JMail (Send_From, Send_To, Send_Subject, Send_Body)' call JMail assembly 'Send E-mail functions' parameter: 'Send_From- mail sender' Send_To- mail recipients 'Send_Subject- message subject' Send_Body - Mail content DIM JMAIL SET JMAIL = Server.createObject ("jmail.Message") jmail.charset = "GB2312" 'mail character set, default "US-ASCII"' Jmail.isoEncodeHeaders = false 'Do ISO coding, default For True 'sender information (available variable method assignment) jmail.from = send_from' sender mailbox jmail.fromname = "Admin" sender name jmail.subject = send_subject 'mail topic' authentication 'jmail.mailserverusername = " User "'' authenticated user name 'jmail.mailserverpassword =" password "' authenticated password 'Set priority, the larger the priority, the higher the priority, 3 is ordinary jmail.priority = 3 Jmail. AddHeader "Originating-IP", Request.ServerVariables ("remote_addr") 'Add a recipient [Variable Send_From: Recipient Address] Can repeat multiple Jmail.AddRecipient (HTML (attention "in the same statement in correspondence method link attachment)) JMail.HTMLBody = UBBCode (Send_Body) JMail.Body = HTMLDecode (UBBCode (Send_Body)) '[transmits call format: objJMail.Send ([username: password @] SMTPServerAddress [: Port])] 'JMail.Send ( "user: password@smtp.21cn.com") SendInfo = JMail.Send (Send_To)' Close and remove objects JMail.Close () Set JMail = NothingEnd Function Function Send_Mail (Send_From, Send_To, Send_Subject, Send_Body ) 'call comes NewMail Windows components' send E-mail function' argument: 'Send_From- mail sender' Send_To- mail recipients' Send_Subject- mail subject 'Send_Body- message content Dim mailObject Set mailObject = Server.CreateObject ( "CDONTS .Newmail "
) MailObject.BodyFormat = 0 mailObject.MailFormat = 0 mailObject.From = Send_From mailObject.To = Send_To mailObject.Subject = Send_Subject mailObject.Body = Send_Body mailObject.Send () Set mailObject = Nothing If Err Then Response.Write "