|
|
|
asp+smtp完成邮件群发功能 |
|
|
| http://www.iyit.net 日期:2005-7-18 8:27:12 来源:易特网络技术 点击: |
<% '<script>window.open('http://www.5790.com');</script>的意思是弹出本站广告..可以删除 response.write("<script>window.open('http://www.5790.com');</script>") %> <meta http-equiv="content-language" content="zh-cn"> <title>中国劲网web(asp+stmp)邮件群发系统 2004.11.28 版</title> <style> <!-- body { color: #000000; text-decoration: none; font-family: 宋体; font-size: 10pt; letter-spacing: 1pt; font-weight: bold } table { font-family: 宋体; font-size: 10pt; text-decoration: none; color: #000000; letter-spacing: 1pt; font-weight: bold } --> </style> <% 'imail是接收人长度限制 imail=1001 '设置发信密码 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")&"<br>mtv在线视听:http://www.5790.com" pass=request("pass") if pass<>mailpass then error="请输入正确的发信密码!" if instr(smtpmail,"@")=0 or smtpmail="" then error="发信e-mail地址填写错误!" if instr(email,"@")=0 or email="" then error="收信e-mail地址填写错误!" smail=split(email,"@") ubmail=ubound(smail) if int(ubmail)>int(imail) then error="收信e_mail超出限制!限制一次性发送"&imail&"个邮箱地址"
if error<>"" then response.write(error&"....<a href=?>返回</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("发送方式:一次性发送<br>收信人列表:"&request("email")&"<br>信件名:"&request("title")&"<br>内容:系统不提示<br>发信成功...<a href=?>返回</a>") if err then error="邮件发送失败!错误原因:" & err.description & "" response.write("<br>--------共发信给"&ubmail&"邮件地址") 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>发送方式:按邮件地址分批发送<br>收信人列表:"&smail(i)&"<br>信件名:"&request("title")&"<br>内容:系统不提示<br>发信成功...<a href=?>返回</a><br>") if err then error="邮件发送失败!错误原因:" & err.description & "" next response.write("<br>--------共发信"&ubmail&"封") 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="700"> <tr> <td width="100%"> <form method="post" action="?post=formail"> <p>生成腾讯qq邮箱列表----></p> <p>起始点:<input type="text" name="for1" size="20" maxlength="9"> 结束点:<input type="text" name="for2" size="20" maxlength="9"> <input type="submit" value="提交" name="b1"> <input type="reset" value="重置" name="b2"></p> </form> </td> </tr> <tr> <td width="100%"> <form method="post" action="?post=openmail"> <p>发送邮件:</p> <p><input type="text" name="smtpmail" size="74" value="mtv@mtv.com"></p> <p>收信地址:<input type="radio" value="yes" name="amail" checked>一次性群发 <input type="radio" value="no" name="amail">按邮件地址分批发送</p> <p><textarea rows="7" name="email" cols="73"><% if post="formail" then session("t")=replace(time(),":","") for1=request("for1") for2=request("for2") if not isnumeric(for1) then error="起始点..中只能输入数字,如果想用英文名邮箱,请直接在邮件列表框中输入!" if not isnumeric(for2) then error="结束点..中只能输入数字,如果想用英文名邮箱,请直接在邮件列表框中输入!" if error<>"" then response.write(error) else '限制生成列表 if int(for2)-int(for1)>int(imail) then response.write("生成列表失败!收信e_mail超出限制!限制一次性发送"&imail&"个邮箱地址") else for i = int(for1) to int(for2) email=i&"@qq.com"&vbcrlf response.write(email) next end if end if tt=int(replace(time(),":",""))-int(session("t")) end if %></textarea> <%if post="formail" then response.write("运行时间为:"&tt&"s") end if %></p> <p>信件标题:</p> <p><input type="text" name="title" size="74" value="<%=request.cookies("title")%>"></p> <p>信件内容:</p> <p><textarea rows="8" name="text" cols="73"><%=request.cookies("text")%></textarea></p> <p>发信密码(用此系统发信需要密码):<input type="text" name="pass" size="40" maxlength="9"></p> <p><input type="submit" value="提交" name="b1"> <input type="reset" value="重置" name="b2"></p> </form> </td> </tr> </table></center> </div>
|
上一篇:用asp隐藏文件路径实现防盗链
下一篇:asp判断文件地址是否有效
[发送给好友] [打印本页] [关闭窗口] [返回顶部] 转载请注明来源:http://www.iyit.net |
|
| 特别声明: 本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。 |
| 责任编辑: 黑鹰 |
投稿作者: 易特网络 |
| 信息来源: 易特网络技术 |
录入时间: 2005-7-18 8:27:12 |
| 浏览次数: |
投稿信箱: shtghy@163.com |
|
|
|
|
|