📄 sendmail.asp
字号:
<!-- #include virtual="/admin/admin_head.asp" -->
<%
Response.Buffer=True
Server.ScriptTimeout=100000000
Dim rsMailing, objSendMail, DB
Dim strSQL, strTo, strFrom
Dim strSubject, strBody, mode
' mail constants (some are for reference)
Const CdoBodyFormatHTML = 0 ' Body property is HTML
Const CdoBodyFormatText = 1 ' Body property is plain text (default)
Const CdoMailFormatMime = 0 ' NewMail object is in MIME format
Const CdoMailFormatText = 1 ' NewMail object is plain text (default)
Const CdoLow = 0 ' Low importance
Const CdoNormal = 1 ' Normal importance (default)
Const CdoHigh = 2 ' High importance
%>
<%mode = request("mode")
if mode <> "" then
strFrom ="BombGame<bgmail@bombgame.com>"
strSubject = request("title")
if mode = "send" then
' 傈眉 雀盔皋老老 版快
strSQL = "select email, idx from ib_member where (email like '%@%') and nomail=0"
'strSQL = "select email, idx from ib_member where (email like '%@%') and nomail=0 and idx<5453"
elseif mode = "test" then
strSQL = "select email, idx from mail_test where (email like '%@%') and nomail=0"
end if
Set rsMailing = DbCon.Execute(strSQL)
index = 0
Do Until rsMailing.EOF
strTo = rsMailing(0)
idx = rsMailing(1)
'strTo = "hypie017@hotmail.com"
If Not (IsNull(strTo)) AND (Instr(strTo, "@") <> 0) AND (Instr(strTo, ".") <> 0) Then
strBody = request("cnts")
' this line calls the MakePage() function to format the page as HTML
strBody = MakePage(strSubject, strBody, strTo)
Set objSendMail = CreateObject("CDONTS.NewMail")
objSendMail.From = strFrom
objSendMail.To = strTo
objSendMail.Subject = strSubject
objSendMail.Body = strBody
objSendMail.BodyFormat = CdoBodyFormatHTML
objSendMail.MailFormat = CdoMailFormatMime
objSendMail.Importance = CdoNormal
objSendMail.Send
Set objSendMail = nothing
response.write (strTo & " 俊霸 " & index & " 锅掳 皋老 惯价<br>")
index = index + 1
End If
rsMailing.MoveNext
Loop
rsMailing.Close
Set rsMailing = nothing
' DB.Close
' Set DB = nothing
'皋老阑 焊辰 饶 mail_history 抛捞喉俊 规陛 焊辰 皋老阑 殿废茄促.(皋老 坷锹 眉农 棺 荐脚 犬牢伏阑 包府窍扁 困窍咯..)
senddate=now
title = strSubject
SQL ="insert mail_history (senddate, title, sendcount) values('" & now & "', '" & title & "', " & index & " )"
response.write sql
DbCon.Execute(SQL)
%>
<script language="JavaScript">
<!--
<% if mode = "test" then %>
alert('<%=index%> 疙俊霸 抛胶飘 皋老捞 惯价登菌嚼聪促.');
document.location.href="sendmail.asp";
<% elseif mode = "send" then %>
alert('<%=index%> 疙俊霸 傍瘤皋老捞 惯价登菌嚼聪促.');
document.location.href="sendmail.asp";
<% end if %>
-->
</script>
<%
' this function returns a properly formatted HTML page
Function MakePage(txtSubject, txtBody, strTo)
Dim txtTemp
'txtTemp = "<HTML>" & vbCrLf
txtTemp = txtTemp & "<HEAD><TITLE>"
txtTemp = txtTemp & txtSubject
txtTemp = txtTemp & "</TITLE>" & vbCrLf
txtTemp = txtTemp & txtBody
'皋老荐脚芭何(叼磊牢篮 概锅 官操绢 林绢具窃)
'==============================================================
txtTemp = txtTemp & " <table border=0 align=center> " & vbCrLf
txtTemp = txtTemp & " <tr> " & vbCrLf
txtTemp = txtTemp & " <td width=582 height=58 align=center valign=middle > " & vbCrLf
txtTemp = txtTemp & " <font color=#333333 size=2>夯 皋老篮 BombGame 雀盔 傈侩 皋老涝聪促. <br>荐脚阑 盔窍瘤 臼绰 版快 <a href=http://www.BombGame.com/mail/nomail.asp?idx=" & idx & " target=_blank><img src=http://www.BombGame.com/mail/images/nomail.gif border=0 align=absmiddle></a> 滚瓢阑 喘矾林矫扁 官而聪促.</font> " & vbCrLf
txtTemp = txtTemp & "</td></tr></table> " & vbCrLf
'==============================================================
'皋老 坷锹 眉农
'==============================================================
txtTemp = txtTemp & "<img src=""http://www.bombgame.com/mail/mailopenchk.asp?email=" & strTo & "&title="& strSubject & """ width=""0"" height=""0""border=""0"">" & vbCrLf
'==============================================================
'txtTemp = txtTemp & "</HTML>"
MakePage = txtTemp
End Function
' this function opens a file and returns the file's contents
Function ReadFile(txtFile)
Dim txtTemp, objFS, objFL
Set objFS = CreateObject("Scripting.FileSystemObject")
Set objFL = objFS.OpenTextFile(txtFile)
Do While Not objFL.AtEndOfStream
txtTemp = txtTemp & objFL.ReadLine
txtTemp = txtTemp & vbCrLf
Loop
objFL.Close
Set objFS = Nothing
ReadFile = txtTemp
End Function
else
%>
<script language="JavaScript">
<!--
function preview()
{
thisform=document.sendmail;
document.sendmail.target="_blank";
document.sendmail.action="Preview.asp";
document.sendmail.submit();
}
// -->
</script>
<form name=sendmail method=post ACTION="sendmail.asp">
<table align="center" border="0" cellpadding="1" cellspacing="1" width="800" class="boardtext03">
<br>
<tr>
<td width="800" height="30" colspan="2" bgcolor="#FFCC00">
<p align="center"><b>雀盔 傍瘤皋老 焊郴扁</b></p>
<p align="center" class="boardtext03">馆靛矫 TEST葛靛肺 犬牢窍绊 傈眉皋老阑 惯价窍技夸!! 荤绊唱搁
奴老吵聪促!!</p>
</td>
</tr>
<tr>
<td width="203" bgcolor="skyblue">
<p align="center"><b>MODE</b></p>
</td>
<td width="597" bgcolor="#CCCCCC">
<p><input type="radio" name="mode" value="test" checked> Test
<input type="radio" name="mode" value="send"> Send</p>
</td>
</tr>
<tr>
<td width="203" bgcolor="skyblue">
<p align="center"><b>Test Mail List</b></p>
</td>
<td width="597" bgcolor="#CCCCCC">
<p>
<%
strSQL = "select email from mail_test where (email like '%@%') and nomail=0 "
Set rsMailing = DbCon.Execute(strSQL)
'rsMailing.Open strSQL, DB,adOpenDynamic,adLockReadOnly,adCmdText
index = 0
Do Until rsMailing.EOF
strTo = rsMailing(0)
response.write (" " &strTo & "<br>")
index = index + 1
rsMailing.MoveNext
Loop
rsMailing.Close
Set rsMailing = nothing
%></p>
</td>
</tr>
<tr>
<td width="203" bgcolor="skyblue">
<p align="center"><b>力 格</b><br></p>
</td>
<td width="597" bgcolor="#CCCCCC">
<p><input type="text" name="title" value="[BombGame] " maxlength="200" size="50" class="input_box"></p>
</td>
</tr>
<tr>
<td width="203" bgcolor="skyblue">
<p align="center"><b>郴 侩</b><br><font class=orange>HTML CODE</font></p>
</td>
<td width="597" bgcolor="#CCCCCC">
<p><textarea name="cnts" rows="20" cols="80" class="input_box"></textarea></p>
</td>
</tr>
<tr>
<td width="800" colspan="2" bgcolor="#CCCCCC" height=30>
<p align="center"><!--<INPUT value=固府焊扁 type=button onclick="javascript:preview();"> --><INPUT type=submit value=皋老惯价 id=submit1 name=submit1 class="input_box"></p>
</td>
</tr>
</table>
</FORM>
<%
end if
%>
<table width="700" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="5"></td>
<td></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="25">
<div align="center"> </div>
</td>
</tr>
</table>
<!-- #include virtual="/admin/admin_bottom.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -