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

📄 sendmail.asp

📁 蓝芒3.0A最新所有功能完整破解版
💻 ASP
字号:
<!--#include file="passinc.asp" -->

<%
dim mailsend
set mailsend = server.createobject("easymail.MailSend")

dim sendisok
sendisok = false

dim createads
createads = false

dim statestr
statestr = "Your mail has been sent successfully."

dim decTextArea
decTextArea = ""

sname = trim(request("sname"))
sfname = trim(request("sfname"))

if sname <> "" and sfname <> "" then
	openresult = mailsend.OpenFriendFolder(Session("wem"), sname, sfname)

	if openresult = -1 then
		set mailsend = nothing
		Response.Redirect "err.asp?errstr=Error"
	elseif  openresult = 1 then
		set mailsend = nothing
		Response.Redirect "err.asp?errstr=Invalid password"
	elseif  openresult = 2 then
		set mailsend = nothing
		Response.Redirect "err.asp?errstr=Folder does not exist or is inaccessible"
	end if
end if


mailsend.createnew Session("wem"), Session("tid")


mailsend.CharSet = trim(request("EasyMail_CharSet"))

mailsend.MailName = trim(request("MailName"))
mailsend.EM_BackAddress = trim(request("EasyMail_BackAddress"))
mailsend.EM_Bcc = trim(request("EasyMail_Bcc"))
mailsend.EM_Cc = trim(request("EasyMail_Cc"))
mailsend.EM_OrMailName = trim(request("EasyMail_OrMailName"))
mailsend.EM_Priority = trim(request("EasyMail_Priority"))

if trim(request("EasyMail_ReadBack")) <> "" then
	mailsend.EM_ReadBack = true
else
	mailsend.EM_ReadBack = false
end if

if IsNumeric(trim(request("EasyMail_SignNo"))) = true then
	mailsend.EM_SignNo = CLng(trim(request("EasyMail_SignNo")))
end if

mailsend.EM_Subject = trim(request("EasyMail_Subject"))

if trim(request("useRichEditer")) = "true" then
	i = 10
	do while i < 20
		mailsend.EM_Text = Request.Form("Mdec_RichEdit_Text" & i)
		i = i + 1
	loop

	i = 20
	do while i < 30
		mailsend.EM_HTML_Text = Request.Form("Mdec_RichEdit_Html" & i)
		i = i + 1
	loop

	mailsend.useRichEditer = true
else
	i = 0
	do while i < 10
		mailsend.EM_Text = Request.Form("Mdec_EasyMail_Text" & i)
		i = i + 1
	loop

	mailsend.useRichEditer = false
end if


mailsend.EM_TimerSend = trim(request("EasyMail_TimerSend"))
mailsend.EM_To = trim(request("EasyMail_To"))
mailsend.ForwardAttString = trim(request("EasyMail_OrAtt"))

mailsend.AddFromAttFileString = trim(request("AddFromAttFileString"))


if trim(request("EasyMail_SystemMail")) <> "" and isadmin() = true then
	mailsend.SystemMessage = true
else
	mailsend.SystemMessage = false
end if


if trim(request("EasyMail_SendBackup")) <> "" then
	mailsend.SendBackup = true
else
	mailsend.SendBackup = false
end if


if trim(request("SendMode")) = "send" then
	if mailsend.Send() = false then
		Set mailsend = nothing
		sendisok = false
	else
		if trim(request("EasyMail_OrMailName")) <> "" then
			mailsend.SetForward trim(request("EasyMail_R_F_MailName"))
		else
			mailsend.SetReply trim(request("EasyMail_R_F_MailName"))
		end if

		Set mailsend = nothing

		sendisok = true

		createads = true
	end if
elseif trim(request("SendMode")) = "save" then
	statestr = "Your mail has been saved successfully."

	if mailsend.Save() = false then
		Set mailsend = nothing
		sendisok = false
	else
		if trim(request("EasyMail_OrMailName")) <> "" then
			mailsend.SetForward trim(request("EasyMail_R_F_MailName"))
		else
			mailsend.SetReply trim(request("EasyMail_R_F_MailName"))
		end if

		Set mailsend = nothing
		sendisok = true
	end if
elseif trim(request("SendMode")) = "timersend" then
	statestr = "Your timed mail has been sent successfully."

	if mailsend.TimerSend() = false then
		Set mailsend = nothing
		sendisok = false
	else
		Set mailsend = nothing
		sendisok = true
	end if
elseif trim(request("SendMode")) = "post" then
	statestr = "Your mail has been posted successfully."

	if mailsend.Post(trim(request("iniid")), trim(request("pid")), trim(request("searchkey"))) = false then
		Set mailsend = nothing
		sendisok = false
	else
		Set mailsend = nothing
		sendisok = true
	end if
elseif trim(request("SendMode")) = "editpost" then
	statestr = "Your mail has been posted successfully."

	dim pf
	set pf = server.createobject("easymail.PubFolderManager")
	pf.load trim(request("iniid"))

	permission = pf.Permission
	isok = false

	if pf.admin <> Session("wem") then
		if (permission = 0 or permission = 1) and Session("mail") = pf.GetPostName(trim(request("oname"))) then
			isok = true
		end if
	else
		isok = true
	end if

	set pf = nothing


	if isok = true then
		if mailsend.EditPost(trim(request("iniid")), trim(request("oname")), trim(request("searchkey"))) = false then
			Set mailsend = nothing
			sendisok = false
		else
			Set mailsend = nothing
			sendisok = true
		end if
	else
		Set mailsend = nothing
		sendisok = false
	end if
end if
%>

<HTML>
<HEAD>
<title>Corp.Email</title>
<LINK href="images\hwem.css" rel=stylesheet>
</HEAD>

<BODY>
<%
if sendisok = true then
%>
<br><br>
<table width="100%"><tr><td width="30"></td><td>
<form method=post name="form1" action="sendend.asp">
<INPUT NAME="gourl" TYPE="hidden" Value="<%=trim(request("gourl")) %>">
<br>
<table border=0 cellspacing=0 cellpadding=0 width="90%">
  <tr bgcolor="#93BEE2">
    <td height="30" style='border-top:1px #8CA5B5 solid; border-right:1px #8CA5B5 solid;' colspan="2"><font class="Wf" color="#104A7B">&nbsp;&nbsp;<b><%=statestr %></b></font></td>
  </tr>
<%
	if createads = true then
		dim ads
		set ads = server.createobject("easymail.Addresses")
		ads.Load Session("wem")

		dim allsendstr
		allsendstr = trim(request("EasyMail_To"))

		if trim(request("EasyMail_Cc")) <> "" then
			allsendstr = allsendstr & "," & trim(request("EasyMail_Cc"))
		end if

		if trim(request("EasyMail_Bcc")) <> "" then
			allsendstr = allsendstr & "," & trim(request("EasyMail_Bcc"))
		end if

		ads.SetSendMailToInfo allsendstr
		allnum = ads.SendMail_Addresses_NoInPrivateAddresses_Count

		i = 0

		if allnum > 0 then
%>
  <tr>
    <td><font class="Wf">&nbsp;&nbsp;The following recipient(s) of the mail:<br>
      </font></td>
    <td align="center" width=100 height="22" bgcolor="#dbeaf5" style='border:1px #8CA5B5 solid;font-size: 9pt;'>
      <font class="s" color="#104A7B"><b> Save Address: </b></font> </td>
  </tr>
<%
			do while i < allnum
				nemail = ads.GetEmail_NoInPriAddresses_ByIndex(i)
%>
  <tr>
    <td height=20 align="right" style='border-bottom: solid #8CA5B5 1px;'><font class="Wf">
	<%=nemail %>&nbsp;&nbsp;</font></td>
    <td align=center bgcolor="#EFF7FF" style='border-left:1px #8CA5B5 solid;border-right:1px #8CA5B5 solid;border-bottom:1px #8CA5B5 solid; font-size: 9pt;'>
	<input type="checkbox" name="newadd<%=i %>" value="<%=nemail %>">
    </td>
  </tr>
<%
				i = i + 1
			loop
		else
			response.write "<tr><td><br><hr size=""1"" color=""#8CA5B5""></td></tr>"
		end if

		set ads = nothing
	else
		response.write "<tr><td><br><hr size=""1"" color=""#8CA5B5""></td></tr>"
	end if
else
%>
<br><br>
<table width="100%"><tr><td width="30"></td><td>
<form method=post name="form1" action="sendend.asp">
<INPUT NAME="gourl" TYPE="hidden" Value="<%=trim(request("gourl")) %>">
<br>
<table border=0 cellspacing=0 cellpadding=0 width="90%">
  <tr bgcolor="#93BEE2">
    <td height="30" style='border-top:1px #8CA5B5 solid; border-right:1px #8CA5B5 solid;' colspan="2"><font class="Wf" color="#104A7B">&nbsp;&nbsp;<b>Operation Failed.</b></font></td>
  </tr>
<%
	response.write "<tr><td><br><hr size=""1"" color=""#8CA5B5""></td></tr>"
end if
%>
<tr><td align="right" colspan="2"><br>
<input type="submit" value=" OK " class="Bsbttn">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<%
if createads = true then
%>
	<input type="hidden" name="newaddnum" value="<%=allnum %>">
<%
end if
%>
</td></tr></form></table>

</BODY>
</HTML>

⌨️ 快捷键说明

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