📄 jmail.asp
字号:
<%
response.buffer=true
response.expires=0
%>
<!--#include file="./includes/dataconn.inc"-->
<!--#include file="./includes/setup.asp"-->
<% Server.ScriptTimeout = 1000 %>
<%
selectt = trim(request.form("selectt"))
zt = trim(request.form("zt"))
nr = trim(request.form("nr"))
fj = trim(request.form("fj"))
sql="select * from user where kt='否'"
if selectt="所有开通用户" then sql="select * from user where kt='是'"
if adminlogin=session("username") and adminpassword=session("password") then
set rs = Conntemp.Execute(sql)
counttemp=rs.fields.count-2
do while not rs.eof
for i=0 to counttemp step 14
Set jmail = Server.CreateObject("JMAIL.Message") '建立发送邮件的对象
jmail.silent = true '屏蔽例外错误,返回FALSE跟TRUE两值j
jmail.Charset = "GB2312" '邮件的文字编码为国标
jmail.ContentType = "text/html" '邮件的格式为HTML格式
jmail.AddRecipient fromemail '邮件收件人的地址
jmail.From = "发送者邮件地址" '发件人的E-MAIL地址
jmail.MailServerUserName = "用户名" '登录邮件服务器所需的用户名
jmail.MailServerPassword = "密码" '登录邮件服务器所需的密码
jmail.Subject = zt '邮件的标题
jmail.Body = nr '邮件的内容
jmail.Send("您的邮件服务器地址") '执行邮件发送(通过邮件服务器地址)
jmail.Close() '关闭对象
next
rs.movenext
loop
Response.write("<script>alert('邮件群发成功!');location.href='email.asp'</script>")
else
%>
<script>alert('您的操作非法,已被系统记录!');location.href='index.asp'</script>
<%
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -