Sub SendMail (A_intid, A_stremail)
Const C_STRMAILSERVER = "Smtp.163.net"
Dim objconn,objrs,strsql
Dim strcontent,strbody,strsubject,objemail
Strbody = "
Strbody = strbody + "<meta http-equiv=content-type content=text/html; charset=gb2312> "
Strbody = strbody + "
Strbody = strbody + "<a Href= ' http://www.china-168.net/center/default.asp>" + "Strbody = strbody + "
Strbody = strbody + "<p style= ' font-size:13px '" + "Hello <a Href=mailto:" &a_strEmail& "" &a_strEmail& "</a> "+" </td> "+ vbCrLf
Strbody = strbody + "<p style= ' font-size:13px '" + "welcome you subscribe to WANLI Information Network mailing list" + "</td>"
Strbody = strbody + "<p style= ' font-size:13px '" + "in order to prevent a subscription error, please click the link below to confirm. Thank you! "+" </td> "
Strbody = strbody + "<p style= ' font-size:13px '" + "<a Href=" "Http://www.china-168.net/EmailList/affirm.asp? Mode=maillist&content= "&a_strEmail&" "" "" "+" click here to subscribe to confirm "+" </a> "
Strbody = strbody + "<p style= ' font-size:13px ' ><a href=http://www.china-168.net target= ' _blank '" "+ vbCrLf
Strbody = strbody + "Strbody = strbody + "alt=" more information to do in Wanli Information network ' > </a> <br>
Strbody = strbody + "<p style= ' font-size:13px '" "+" Welcome to visit Wanli Information Network again! "+" </td> "
Strbody = strbody + "</body>
' Send email
On Error Resume Next
Set objemail = Server. CreateObject ("Persits.mailsender")
Objemail.host = C_strmailserver
Objemail.from = "Jiabaoxu@163.net"
Objemail.fromname = "China-168.net"
Objemail.addaddress A_stremail
Objemail.subject = "Subscription Confirmation"
Objemail.ishtml = True
Objemail.charset = "gb2312"
Objemail.body = Strbody
Objemail.send
' Procuratorial error
If Err.Number = 0 Then ' if successful
Response.Write ("<p align=center class=cn> to ensure the user is not harassed, we will issue a confirmation letter, please visit the URL in the letter to confirm registration </td>")
Else ' If the failure shows the cause of the error
Response.Write ("<p align=center class=cn> message send error, error reason: <br>")
Response.Write ("<font color=red>" &Err.Description& "</font> </td>")
End If
' Clear
Set objemail = Nothing
End Sub
Use this procedure:
<%
.....
Rtsemail guestmailid, "&email&"
.....
%>