📄 sendok_fa.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")
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open "Select * from mail order by id DESC",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 + -