一聚教程网:一个值得你收藏的教程网站

热门教程

ASP+SMTP完成邮件群发功能

时间:2022-07-02 23:28:44 编辑:袖梨 来源:一聚教程网

-->

中国劲网Web(ASP</a>+STMP)邮件群发系统 2004.11.28 版

<%
'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")&"
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&"....返回")
Response.End
Else
if Request("amail")="yes" then
mailaddress=email
Set MailObject = Server.CreateObject("CDONTS.NewMail")
MailObject.Send smtpmail,mailaddress,mailtopic,body

热门栏目