ASP+SMTP to complete the bulk mail function

Source: Internet
Author: User
Tags mail reset split
ASP+|SMTP-->
<meta http-equiv= "Content-language" content= "ZH-CN" >
<TITLE> China Network web (asp+stmp) Mail mass system 2004.11.28 Edition </TITLE>
<style>
<!--
Body {color: #000000; Text-decoration:none font-family: XXFarEastFont-font-size:10pt;
letter-spacing:1pt; Font-weight:bold}
Table {font-family: song body; font-size:10pt; text-decoration:none; color: #000000;
letter-spacing:1pt; Font-weight:bold}
-->
</style>
<%
' IMail is the receiver length limit.
imail=1001
' Set the letter password
Mailpass= "Www.5790.com"
Post=request ("POST")
Response.Cookies ("text") =request ("text")
Response.Cookies ("title") =request ("title")
If post= "OpenMail" Then
Smtpmail=request ("SmtpMail")
On Error Resume Next

Email=replace (Request ("email"), VbCrlf, ",")
Mailtopic=request ("title")
Body=request ("text") & "&LT;BR&GT;MTV online Audio-visual: Http://www.5790.com"
Pass=request ("Pass")
If Pass<>mailpass then error= "Please enter the correct letter password!" "
If InStr (SmtpMail, "@") =0 or smtpmail= "then error=" email address fill error! "
If InStr (email, "@") =0 or email= "then error=" Receipt of e-mail address error! "
Smail=split (email, "@")
Ubmail=ubound (Smail)
if int (ubmail) >int (imail) then error= "Receipt E_Mail exceeds the limit!" Limit one-time send "&imail&" email address

If error<> "" Then
Response.Write (error& "... <a href=?> return </a>")
Response.End
Else

If Request ("amail") = "yes" then
Mailaddress=email
Set mailobject = Server.CreateObject ("CDONTS. NewMail ")
Mailobject.send Smtpmail,mailaddress,mailtopic,body
Set mailobject=nothing
Response.Write ("Send: Send <br> receive person list:" &request ("email") & "<br> Letter Name:" &request ("title") & "<br> content: System does not prompt <br> letter successful ... <a href=?> return </a>")
If Err Then error= "Mail send failed! Error Reason: "& Err.Description &"
Response.Write ("<br>--------Letters to" &ubmail& "email address----www.5790.com----small art development---contact qq:52093---")
Response.End
Else
Smail=split (email, ",")
Ubmail=ubound (Smail)
For i = 0 to Ubmail
Mailaddress=smail (i)
Set mailobject = Server.CreateObject ("CDONTS. NewMail ")
Mailobject.send Smtpmail,mailaddress,mailtopic,body
Set mailobject=nothing
Response.Write ("--------------------------------<br> send by email address batch <br> recipient list:" &smail (i) & " <br> Letter Name: "&request (" title ") &" <br> content: System does not prompt <br> letter successful ... <a href=?> return </a><br > ")
If Err Then error= "Mail send failed! Error Reason: "& Err.Description &"
Next
Response.Write ("<br>--------letter" &ubmail& "----www.5790.com----small art development---contact qq:52093---")
Response.End
End If

End If
End If
%>


<div align= "center" >
<center>

<table border= "0" cellpadding= "0" cellspacing= "0" style= "border-collapse:collapse" bordercolor= "#111111" width= " ">"
<tr>
&LT;TD width= "100%" >
<form method= "POST" action= "Post=formail" >
<p> generate Tencent QQ Email list----></p>
<p> starting point: <input type= "text" name= "For1" size= "" maxlength= "9" > End point: <input type= "text" name= "For2" size= "9" Maxlength= >
<input type= "Submit" value= "submitted" name= "B1" >
<input type= "reset" value= "reset" name= "B2" ></p>
</form>
</td>
</tr>
<tr>
&LT;TD width= "100%" >
<form method= "POST" action= "Post=openmail" >
<p> Send mail:</p>
<p><input type= "text" name= "smtpmail" size= "value=" "mtv@mtv.com" ></p>
<p> receiving Address: <input type= "Radio" value= "Yes" name= "Amail" checked> one-time mass
<input type= "Radio" value= "No" name= "Amail" &



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.