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

📄 sendmail.asp

📁 电子商务网络购物系统
💻 ASP
字号:
<% Option Explicit %>
<!--#include file="conn.asp" -->
<!--#include file="functions/sendmail.asp" -->
<%
Server.ScriptTimeout =  1000

Dim intSelGroupID
Dim strEmailBody
Dim strSubject
Dim strEmailAddress
Dim strMemUserName
Dim lngNumberOfMembers
Dim blnLCode
Dim strMainForumName
Dim strForumEmailAddress
Dim intEmailSentLoopCounter
Dim strMailComponent
Dim strIncomingMailServer

strSQL = "SELECT timescfg.* From timescfg;"
rsConn.Open strSQL, adoCon
blnLCode = CBool(rsConn("lcode"))
strMainForumName = rsConn("bbsname")
strForumEmailAddress = rsConn("masteremail")
strMailComponent = rsConn("mailcomponent")
strIncomingMailServer = rsConn("smtpserver")
If blnMassMailier = False Then
	rsConn.Close
	Set rsConn = Nothing
	adoCon.Close
	Set adoCon = Nothing
	Response.Redirect("menu.asp")
End If
rsConn.Close

intSelGroupID = CInt(Request.Form("group"))
strEmailBody = Request.Form("message")
strSubject = Request.Form("subject")
If intSelGroupID = 0 Then
	strSQL = "SELECT timesuser.Username, timesuser.useremail  "
	strSQL = strSQL & "From timesuser "
	strSQL = strSQL & "WHERE timesuser.useremail <> '';"
Else
	strSQL = "SELECT timesuser.Username, timesuser.useremail  "
	strSQL = strSQL & "From timesuser "
	strSQL = strSQL & "WHERE timesuser.grpid = " & intSelGroupID & " AND timesuser.useremail <> '';"
End If
rsConn.CursorType = 3
rsConn.Open strSQL, adoCon
%>

<html>
<head>
<title>群发邮件</title>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link href="includes/style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div align="center"><span class="heading"><font size="5"><strong>群发邮件</strong></font></span><br>
  <br />
  <a href="menu.asp" target="_self">返回到管理主菜单</a><br>
  <br>
  <span class="text">你可以给所有的用户或者特定的用户组广播邮件</span><br />
 <br />
 <table width="96%" border="0" cellspacing="1" cellpadding="4" bgcolor="#000000">
  <tr> 
   <td bgcolor="#FFFFFF" class="text"><%
	lngNumberOfMembers = rsConn.RecordCount
	Response.Write("<span class=""lgText"">The email's are being sent<br />Do not Hit Refresh or some members will receive the email twice!</span><br /><br />This may take some time depending on the speed of the mail server and how many email's there are to send.")
	Response.Write("<form name=""frmSent"">There are <input type=""text"" size=""4"" name=""sent"" value=""0""> email's sent out of a total of " & lngNumberOfMembers & "</form>")
	Do While NOT rsConn.EOF
		intEmailSentLoopCounter = intEmailSentLoopCounter + 1
		strEmailAddress	= rsConn("Username")
		strMemUserName = rsConn("useremail")
		Response.Write(vbCrLf & "<script langauge=""JavaScript"">document.frmSent.sent.value = " & intEmailSentLoopCounter & ";</script>")
		Call SendMail(strEmailBody, decodeString(strEmailAddress), decodeString(strMemUserName), strMainForumName, decodeString(strForumEmailAddress), strSubject, strMailComponent, false)
		rsConn.MoveNext
	Loop
	Response.Write(vbCrLf & "<br /><span class=""lgText"">Your email's have now been sent.</span>")
rsConn.Close
Set rsConn = Nothing
adoCon.Close
Set adoCon = Nothing   
   %></td>
  </tr>
 </table>
</div>
<br />
</body>
</html>

⌨️ 快捷键说明

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