Sub Sendmail (explorer, CC, sender, username, password, subject, content, MailServer)
Set Jmail = Server. Createobject ( " Jmail. Message " ) ' Create an email recipient
Jmail. Silent = True ' Block exception errors. Return false and true values J.
Mail. Logging = True ' Enable Mail Log
Jmail. charset = " Gb2312 " ' The text code of the email is the National Standard
Jmail. contenttype = " Text/html " ' The email is in HTML format.
Jmail. addrecipient Receiver ' Email Recipient address
Jmail. addrecipientcc CC ' Email CC address
Jmail. From = Sender ' The sender's E-MAIL address
Jmail. mailserverusername = Username ' Username required to log on to the email server
Jmail. mailserverpassword = Password ' Password required to log on to the email server
Jmail. Subject = Subject ' Email title
Jmail. Body = Content ' Email content
' Jmail. prority = 1' urgent mail program, 1 is the fastest, 5 is the slowest, 3 is the default
Jmail. Send (MailServer) ' Execute email sending (via email server address)
Jmail. Close () ' Close object
End sub
If Request ( " Action " ) = " Sendmail " Then
Strreceiver = " 8888@vip.163.com "
Strcc = " Stone@hotmail.com "
Strsender = "S Tone@163.com "
Strusername = " Stone@163.com "
Strpassword = 888888 "
Strsubject = " Website order -- " & Now ()
Strcontent = " Product: " & Request ( " Product " ) & " <Br> Company Name: " & Request ( " Compname " ) & " <Br> company phone number: " & Request ( " Phone " ) & " <Br> Fax Number: " & Request ( " Fax " ) & " <Br> Email: " & Request ( " Email " ) & " <Br> contact: " & Request ( " Truename " ) & " <Br> contact address: " & Request ( " Address " ) & " <Br> note: " & Request ( " Other " ) & ""
Strmailserver = " Smtp.163.com "
Call Sendmail (strreceiver, strcc, strsender, strusername, strpassword, strsubject, strcontent, strmailserver)
Response. Write ( " <SCRIPT> alert ('order sent successfully'); window. Location. href = 'home. asp '</SCRIPT> " )
End If