📄 mailsend.asp
字号:
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<meta copy="程序制作:xoyu(QQ:5964887)www.xoyu.com">
<link rel="stylesheet" href="admin.css" type="text/css">
</head>
<body>
<%Admin="UserMail"%>
<!--#include file="check.asp"-->
<!--#include file="config.asp"-->
<%
'#################################################################
'# 晓宇听幽网站内容管理系统(xoYu CMS)
'#
'# 版权所有: 晓宇听幽工作室
'#
'# 制作人 : xoyu(晓宇)
'#
'# 主页地址: http://www.xoYu.com 晓宇听幽工作室
'# 论坛地址: http://www.xoYu.com/bbs/ 晓宇听幽讨论区
'#
'#【版权声明】
'#################################################################
'# 本软体为共享软体(shareware)提供个人网站免费使用,请勿非法修改,
'# 转载,散播,或用于其他图利行为,并请勿删除版权声明。
'# 如果您的网站正式起用了这个脚本,请您通知我们,以便我们能够知晓!
'# 如果可能,请在您的网站做上我们的链接,希望能给予合作。谢谢!
'#################################################################
'# 程序名称:晓宇听幽网站内容管理系统·网站内容管理系统
'# 英文名称:xoYu News 2004 Professional For xoYu CMS
'# 程序创建时间:2003-7-10
'# 程序完成时间:2003-9-11
'# 最后修改时间:2003-11-15
'#################################################################
'# 请您尊重我们的劳动和版权,不要删除以上的版权声明部分,谢谢合作
'# 如有任何问题请到我们的论坛(http://www.xoyu.com/bbs/)告诉我们。
'#################################################################
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 width="600" border="0" cellspacing="1" cellpadding="3" align=center class="tableBorder">
<tr>
<th width="594" colspan="2">
<p><b>邮件列表</b></th>
</tr>
<tr>
<td width="594" class=forumrow colspan="2">
在完整填写以下表单后点击发送,信息将发送到所有注册时完整填写了信箱的用户,<font color="#0000FF"><br>
</font>注意:<font color="#FF0000">邮件列表的使用将消耗大量的服务器资源</font>,请慎重使用。</td>
</tr>
<tr>
<td width="77" class=forumrow>
用户类别:</td>
<td width="512" class=forumrow>
<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" class=forumrow>
邮件标题:</td>
<td width="512" class=forumrow>
<input type=text name=zt size=71 value="<%=webname%>通知"></td>
</tr>
<tr>
<td width="77" class=forumrow valign="top">
邮件内容:<br>
<br>
<font color="#808080">使用HTML语言<br>
</font>
<a href="javascript:openscriphtml()">HTML编辑</a></td>
<td width="512" class=forumrow>
<textarea cols=69 rows=15 name="body"></textarea></td>
</tr>
<tr>
<th width="594" colspan="2">
<p align="center"><input type=Submit value="发 送" name=Submit">
<input type="reset" name="Clear" value="清 除"></th>
</tr>
</table>
</center>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -