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

📄 sendmail.asp

📁 网上流行的MOVE站点
💻 ASP
字号:
<!--#include file="articleconn.asp"-->
<!--#include file="security.asp"-->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style type=text/css>
body  { background:#336699; margin:0px; font:9pt 宋体; }
table  { border:0px; }
td  { font:normal 12px 宋体; }
img  { vertical-align:bottom; border:0px; }
a  { font:normal 12px 宋体; color:#000000; text-decoration:none; }
a:hover  { color:#000000;text-decoration:underline; }
.sec_menu  { border-left:1px solid white; border-right:1px solid white; border-bottom:1px solid white; overflow:hidden; background:#D6DFF7; }
.menu_title  { }
.menu_title span  { position:relative; top:2px; left:8px; color:#215DC6; font-weight:bold; }
.menu_title2  { }
.menu_title2 span  { position:relative; top:2px; left:8px; color:#428EFF; font-weight:bold; }
</style>
<title>通知</title>
</head>
<body ><br>
<form name="sendmail" action="?action=send" method="post">
  <div align="center">
    <center>
    <table border="0" cellspacing="0" cellpadding="4" width="400" bgcolor="#f3f3f0" style="border-collapse: collapse" bordercolor="#111111">
      <tr bgcolor="#f3f3f3">
        <td height="23" colspan="2" align="center" bgcolor="#fff000"><b>发 送 邮 件</b></td>
      </tr>
      <tr>
        <td align="center">发信人地址:<input type="text" name="frommail" size="20" value="love86960373@hotmail.com"> </td>
      </tr>
      <tr>
        <td align="center">收信人地址:<input type="text" name="tomail" size="20" value="<%=request("email")%>"> </td>
      </tr>
      <tr>
        <td align="center">信件标题:<input type="text" name="mailsubject" size="20" value="罗村在线--宽频影院"> </td>
      </tr>
      <tr>
        <td align="center">信件内容:<br><textarea name="mailbody" cols="40" rows="8"></textarea> <br>
        </td>
      </tr>
      <tr>
        <td align="center"><input type="submit" name="Submit" value=" 发 送 ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="reset" name="Submit" value=" 取 消 "> </td>
      </tr>
    </table>
    </center>
  </div>
</form>

</body>

<%
if request("action") = "send" then
	frommail = Trim(Request.Form("frommail"))
	tomail = Trim(Request.Form("tomail"))
	mailsubject = Trim(Request.Form("mailsubject"))
	mailbody = Trim(Request.Form("mailbody"))
	smtpserver ="ip"
smtpuser ="webmaster@i-movie.cn"
smtppwd ="pass"
	
	if tomail<>"" then
	' 创建jmail对象:
    Set JMail = Server.CreateObject("JMail.Message")
     '身分验证
        JMail.MailServerUserName = smtpuser
        JMail.MailServerPassword = smtppwd    	
		JMail.Charset ="gb2312"
		JMail.ContentType = "text/html"
		JMail.from = frommail
		JMail.AddRecipient(""&tomail&"")
		JMail.Subject = mailsubject  
		JMail.Body = mailbody
		JMail.Priority = 3   
        JMail.Send(smtpserver)
        JMail.Close()
    Set JMail=nothing
	else
			' 创建jmail对象:
    Set JMail = Server.CreateObject("JMail.Message")
            '身分验证
        JMail.MailServerUserName = smtpuser
        JMail.MailServerPassword = smtppwd
	    JMail.Charset ="gb2312"
	    JMail.ContentType = "text/html"
		JMail.from = frommail
		sql="select email from users"
		set rs=conn.execute(sql)
		Response.Write("正在邮件群发.................." )
		do while not rs.eof 
		JMail.AddRecipient(""&rs("email")&"")
		RS.MoveNext
		Loop
		rs.close
		JMail.Subject = mailsubject  
		JMail.Body = mailbody
		JMail.Priority = 3   
        JMail.Send(smtpserver)
        JMail.Close()
    Set JMail=nothing
	end if
	Response.Write "<script>alert(""发送成功"");location.href=""sendmail.asp"";</script>"
	Response.End
end if
%>

</html>

</body>
</html>

⌨️ 快捷键说明

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