⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sendok.asp

📁 亿众购物系统 一套设计完善、高效的web商城解决方案
💻 ASP
字号:
<!--#include file="../Session.asp"-->
<%
Server.ScriptTimeout=999999
fwq=Request.form("fwq")
passname=request.form("passname")
password=request.form("password")
title=Request.form("title")
txt=request.form("txt")
name=request.form("name")
radiobutton=request.form("radiobutton")
fa=request.form("fa")
faemail=request.form("faemail")
hjf=request.form("hjf")
session("fwq")=fwq
session("passname")=passname
session("password")=password
session("title")=title
session("txt")=txt
session("name")=name
session("radiobutton")=radiobutton
session("fa")=fa
session("faemail")=faemail
session("hjf")=hjf
If fwq = "" then
Response.Write "没有填写邮件服务器,将无法发送"
Response.End 
End If
If title="" Then
Response.Write ("<script>alert('邮件标题没有填写,将无法发送信息');javascript:history.back(1)</script>")
response.end
end if
if txt="" then
Response.Write ("<script>alert('邮件内容没有填写,将无法发送信息');javascript:history.back(1)</script>")
response.end
end if
if name<>"" then
set jmail=server.createobject("jmail.message")
jmail.charset="gb2312"
jmail.silent=true
jmail.addrecipient name
jmail.subject=title
if radiobutton="text" then
jmail.appendtext txt
elseif radiobutton="html" then
jmail.appendtext "这是一封html格式的邮件"
jmail.appendhtml txt
end if
if fa<>"" then
jmail.fromname = fa
end if
if faemail<>"" then
jmail.from=faemail
end if
jmail.priority = hjf
if passname<>"" then
jmail.MailServerUserName =passname
end if
if password<>"" then
jmail.MailServerPassWord =password
end if
err=jmail.send(fwq)
jmail.close
set jmail=nothing 
if err then
Response.Write ("<script>alert('邮件内容已经发送到指定的邮箱地址了,请确定返回!');javascript:history.back(1)</script>")
else
response.write ("<script>alert('由于系统错误,邮件未能正常发送,请确定返回检查各项数据是否错误!');javascript:history.back(1)</script>")
end if
response.end
end if
'----------------------------------------------------------
if name="" then%>
<%
set jmail = server.createobject("jmail.message")
sql="Select * from Member where Subscibe=True order by id DESC"
Set rs = server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
do while not rs.eof
jmail.charset="gb2312"
jmail.Silent=true
jmail.addrecipient rs("mail")
jmail.subject = title
if radiobutton="text" then
jmail.appendtext txt
elseif radiobutton="html" then
jmail.appendtext "这是一封html格式的邮件"
jmail.appendhtml txt
end if
if fa<>"" then
jmail.fromname = fa
end if
if faemail="" then
jmail.from=faemail
end if
jmail.priority = hjf
if passname<>"" then
jmail.MailServerUserName =passname
end if
if password<>"" then
jmail.MailServerPassWord =password
end if
err=jmail.send(fwq)
jmail.clear
rs.movenext
loop 
jmail.close
set jmail=nothing
rs.close
set rs=nothing
conn.close
set conn=nothing
if err then
Response.Write ("<script>alert('邮件内容已经发送到指定的邮箱地址了,请确定返回!');javascript:history.back(1)</script>")
else
response.write ("<script>alert('由于系统错误,邮件未能正常发送,请确定返回检查各项数据是否错误!');javascript:history.back(1)</script>")
end if
response.end
end if
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -