📄 mailsend.asp
字号:
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<title>惊云下载系统(HTML版)</title>
<style>
td{font-size:9pt;line-height:160%}
body{font-size:9pt;line-height:160%}
a:link { color: #0033CC; text-decoration: none }
a:visited { color: #0033CC; text-decoration: none }
a:active { color: #FF0000; text-decoration: none }
a:hover { color: #000000; text-decoration: underline}
</style>
</head>
<body topmargin="1" leftmargin="1">
<%Admin="UserMail"%>
<!--#include file="check.asp"-->
<!--#include file="config.asp"-->
<%
if websmtp="" or webemail="" then
response.write("<b>当前不能发信:系统设置错误或当前设置为不使用发信功能!</b>")
response.end
end if
if request("sen")="ok" then
if request("zt")="" then
response.write("<script>alert('邮件标题 不能为空!');history.go(-1)</script>")
response.end
end if
if request("body")="" then
response.write("<script>alert('邮件内容 不能为空!');history.go(-1)</script>")
response.end
end if
%>
<!--#include file="mdb_path_user.asp"-->
<%
Set rs= Server.CreateObject("ADODB.Recordset")
if request("dj")<>"" then
rs.open "select * from UserInfo where email<>''",conn,1,1
else
rs.open "select * from UserInfo where email<>'' and dj="&request("dj"),conn,1,1
end if
if rs.eof and rs.bof then
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write("<script>alert('还没有用户!');history.go(-1)</script>")
response.end
end if
fromemail=""&webemail&""
zt=""&request("zt")&""
nr=""&request("body")&"<br><br>版权所有 "&webname&" <a href='http://"&weburl&"' target='_blank'>"&webname&" http://"&weburl&"</A>"
do while not rs.eof
toemail=""&rs("email")&""
if websmtp="JMAIL" then
call JMAIL()
elseif websmtp="CDONTS" then
call mail()
end if
i=i+1
rs.movenext
loop
rs.close
set rs=nothing
conn.close
set conn=nothing
if SendMail<>"ok" then
response.write("<b>■ 发信失败:服务器不支持当前设置的发信组件!</b>")
else
response.write("<b>■ 成功发出("&i&"封)通知邮件!</b>")
end if
end if
sub JMAIL()
on error resume next
Dim JMail
Set JMail=Server.CreateObject("JMail.SMTPMail")
JMail.Logging=True
JMail.Charset="gb2312"
JMail.ContentType = "text/html"
JMail.ServerAddress=SMTPServer
JMail.Sender= fromemail
JMail.Subject= zt
JMail.Body= nr
JMail.AddRecipient toemail
JMail.Priority=3
JMail.Execute
Set JMail=nothing
if err then
SendMail=err.description
err.clear
else
SendMail="ok"
end if
end sub
sub mail()
on error resume next
dim mail
Set mail = Server.CreateObject("CDONTS.NewMail")
mail.BodyFormat = 0
mail.MailFormat = 0
mail.To = toemail
mail.From = fromemail
mail.Subject = zt
mail.Body = nr
mail.Send
set mail=nothing
if err then
SendMail=err.description
err.clear
else
SendMail="ok"
end if
end sub
%>
<SCRIPT LANGUAGE="JavaScript">
function AddText(NewCode) {
document.frmAnnounce.body.value+=NewCode
}
function openscriphtml()
{
if (navigator.appName!="Microsoft Internet Explorer")
alert("此功能 Netscape 用户不能使用!")
else
{newwin=window.open('html_editor.htm','','width=544,height=294');
newwin.focus();
}
}
function runEx(){
//alert('请注意,按下确定将生成页面,按下后请稍后....');
var winEx = window.open("", "winEx", "width=300,height=200,status=yes,menubar=yes,scrollbars=yes,resizable=yes"); winEx.document.open("text/html", "replace");
winEx.document.write(unescape(event.srcElement.parentElement.children[2].value));
winEx.document.close();
}
</SCRIPT>
<script language="Javascript">
<!-- hide
function insertsmilie(smilieface){
document.frmAnnounce.body.value+=smilieface;
}
// -->
</script>
<form action="mailsend.asp?sen=ok" method=post name="frmAnnounce">
<div align="center">
<center>
<table border="0" width="600" cellspacing="1" bgcolor="#555555" cellpadding="2">
<tr>
<td width="594" bgcolor="#6A6A6A" colspan="2">
<p><font color="#FFFFFF"><b>邮件列表</b></font></td>
</tr>
<tr>
<td width="594" bgcolor="#FFFFFF" colspan="2">
在完整填写以下表单后点击发送,信息将发送到所有注册时完整填写了信箱的用户,<font color="#0000FF"><br>
</font>注意:<font color="#0000FF">邮件列表的使用将消耗大量的服务器资源</font>,请慎重使用。</td>
</tr>
<tr>
<td width="77" bgcolor="#FFFFFF">
用户类别:</td>
<td width="512" bgcolor="#FFFFFF">
<select size="1" name="dj">
<option value="0"<%if dj="0" then%> selected<%end if%>>①:普通会员</option>
<option value="1"<%if dj="1" then%> selected<%end if%>>②:高级会员</option>
<option value="2"<%if dj="2" then%> selected<%end if%>>③:管 理 员</option>
<option value="">所有用户</option>
</select></td>
</tr>
<tr>
<td width="77" bgcolor="#FFFFFF">
邮件标题:</td>
<td width="512" bgcolor="#FFFFFF">
<input type=text name=zt size=71 value="<%=webname%>通知"></td>
</tr>
<tr>
<td width="77" bgcolor="#FFFFFF" valign="top">
邮件内容:<br>
<br>
<font color="#808080">使用HTML语言<br>
</font>
<a href="javascript:openscriphtml()">HTML编辑</a></td>
<td width="512" bgcolor="#FFFFFF">
<textarea cols=69 rows=15 name="body"></textarea></td>
</tr>
<tr>
<td width="594" bgcolor="#E9E9E9" colspan="2">
<p align="center"><input type=Submit value="发 送" name=Submit">
<input type="reset" name="Clear" value="清 除"></td>
</tr>
</table>
</center>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -