📄 sendmail.asp
字号:
<!--#include file="../include/buyok_shop_30_conn.asp"-->
<!--#include file="checkadmin.asp"-->
<script language=javascript src=../include/mouse_on_title.js></script>
<%call checkmanage("05")%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="manage.css" type="text/css">
</head>
<BODY background="../images/admin/back.gif">
<table width="98%" border="1" style="border-collapse: collapse; border-style: dotted; border-width: 0px" bordercolor="#333333" cellspacing="0" cellpadding="2">
<tr>
<td colspan=2 class=td height=18>
<div align="center"><b><font color="#FF0000"> <font color="#FFFFFF">抱歉,您使用的是未注册版本,未提供本功能.
</font></font></b></div>
</td>
</tr>
<tr>
<td width=13% height=25 align=center> </td>
<td width="87%"><b><font color="#FF0000">客户服务及反馈中心 抱歉,您使用的是未注册版本,未提供本功能.</font></b></td>
</tr>
<tr>
<td width=13% height=25 align=center valign=top"><font color="#FF0000">联系方式</font></td>
<td width="87%"><b><font color="#FF0000">Phone:010-88684912 13366690044 MSN:asp3721@msn.com
QQ:88353022 </font></b></td>
</tr>
<form action='prod0.asp?action=addMidclass' method=post name=addmidclass>
<tr>
<td width=13% height=25 align=center><font color="#FF0000">备 注</font></td>
<td width="87%"><b><font color="#FF0000">非在线支付购买的用户,汇完款 请QQ或电话联系管理员</font></b></td>
</tr>
<tr>
<td colspan=2>
<div align="center"><b><font color="#FF0000"><a href="http://www.asp3721.cn/"><font color="#990000">asp3721软件中心
我们将为你提供优质服务,谢谢!http://www.asp3721.cn/</font></a></font></b> </div>
</td>
</tr>
</form>
</table>
<%
action=request("action")
if action="send" then
call sendmail()
else
usermail=request.ServerVariables("query_string")
%>
<form action="sendmail.asp" method=post name=usermail>
<table width="98%" border="1" style="border-collapse: collapse; border-style: dotted; border-width: 0px" bordercolor="#333333" cellspacing="0" cellpadding="2" style="word-break:break-all">
<tr><td colspan=2 class=td height=18>向会员发送邮件</td></tr>
<tr><td width=20% align=center>收件人</td>
<td><TEXTAREA NAME="usermail" rows=4 style="width=80% ; overflow:auto;"><%=usermail%></TEXTAREA> <img align=top src=../images/admin/memo.gif alt="填写收件人邮箱地址<br>多个邮箱以半角逗号或分号隔开<br><font color=red>千万不要发垃圾邮件哦~后果很严重</font>"> </td></TR>
<tr><td width=20% align=center>邮件主题</td><td><input type=text name=mail_subject style="width=80%;" maxlength=50> <img src=../images/admin/memo.gif alt="填写邮件主题<br><font color=red>技巧:好的主题吸引人点击阅读<br>差的主题可能会被直接删除</font>"> </td></TR>
<tr><td width=20% align=center>邮件内容<br><br><font color=red>(1000字符以内)</font></td><td><TEXTAREA NAME="mail_body" ROWS="15" style="width=80% ; overflow:auto;"></TEXTAREA> <img align=top src=../images/admin/memo.gif alt="支持html<br>但若收件人的邮箱不支持html<br>则看到的是一堆代码而矣"> </td></TR>
<tr><td colspan=2>
<input type=hidden name=action value="send">
<input type=submit value="立即发送" onclick="{if(confirm('请注意,不要发送垃圾邮件!(人家很生气,后果很严重~~~)\n\n确认要发送这些邮件吗?确认无误后单击“确定”继续~')){this.document.usermail.submit();return true;}return false;}">
<input type="reset" value="重新填写">
</table>
</form>
<%
end if
sub sendmail()
mail_subject=trim(request("mail_subject"))
mail_body=trim(request("mail_body"))
usermail=trim(request("usermail"))
usermail=replace(usermail," ","")
usermail=replace(usermail,";",";")
usermail=replace(usermail,",",";")
usermail=replace(usermail,",",";")
if usermail="" or mail_subject="" or mail_body="" then
response.write "<script language='javascript'>"
response.write "alert('出错了,收件人、邮件主题、邮件内容必须完整填写。');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
if UBound(split(usermail,";"))>20 then
response.write "<script language='javascript'>"
response.write "alert('出错了,您填写的收件人太多了~~');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
Set rs = conn.Execute("select * from shopsetup")
jmail=rs("jmail")
adm_mail=rs("adm_mail")
qf_mailyesorno=rs("qf_mailyesorno")
mailserver=rs("mailserver")
mailname=rs("mailname")
mailpassword=rs("mailpassword")
set rs=nothing
if qf_mailyesorno=1 then
dim msg
if jmail=0 then
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.To = UserMail
objMail.From =mailname
objMail.Subject = mail_subject
objMail.Body = mail_body
objMail.Send
Set objMail = Nothing
else
Set msg = Server.CreateObject("JMail.Message")
msg.silent = true
msg.Logging = true
msg.Charset = "gb2312"
msg.MailServerUserName = mailname
msg.MailServerPassword = mailpassword
msg.From = mailname
msg.FromName = sitename
user_mail=split(usermail,";")
for N=0 to UBound(user_mail)
msg.AddRecipient user_mail(n)
next
msg.Subject = mail_subject
msg.Body = mail_body
msg.Send (mailserver)
msg.close
set msg = nothing
end if
response.write "<script language='javascript'>"
response.write "alert('恭喜,邮件已经发出。');"
response.write "location.href='user3.asp';"
response.write "</script>"
response.end
else
response.write "<script language='javascript'>"
response.write "alert('抱歉,邮件功能没有打开。');"
response.write "location.href='user3.asp';"
response.write "</script>"
response.end
end if
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -