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

📄 sendmail.aspx

📁 互动留言簿.NET2.0
💻 ASPX
字号:
<% @ Import Namespace="system.web.mail" %>
<script runat=server>
public sub page_load(obj as object,e as eventargs)
If request.querystring("mail")="" Then 
message.text="错误:这家伙没有填写Email地址,不能发送邮件!" 
sendmail.enabled=false
resetform.disabled=true
mailcontent.enabled=false
End If
end sub 
public sub send_mail(obj as object,e as eventargs)
if session("isadmin")<>"" then
try
Dim mailfrom As string=ConfigurationSettings.AppSettings("回信地址")
Dim mailto As string=request.querystring("mail")
dim mailsubject as string=ConfigurationSettings.AppSettings("网站名称")+"留言簿管理员给你的回复信"
dim mailtext as string=mailcontent.text
smtpmail.smtpserver=ConfigurationSettings.AppSettings("邮件服务器")
smtpmail.send(mailfrom,mailto,mailsubject,mailtext)
message.text="提示:邮件已经发送成功!!"
mailcontent.text=""
Catch objex As exception
message.text="错误:发送邮件失败,请检查邮件服务器是否可用"
End Try 
else
message.text="错误:你不是管理员,没有在线发送邮件的权限"
end if 
end sub 
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>高级在线发送邮件[管理员专用]</title>
<style>
TEXTAREA {
BORDER-RIGHT: <%=ConfigurationSettings.AppSettings("字体颜色")%> 1px solid; BORDER-TOP: <%=ConfigurationSettings.AppSettings("字体颜色")%> 1px solid; BORDER-LEFT: <%=ConfigurationSettings.AppSettings("字体颜色")%> 1px solid; COLOR: <%=ConfigurationSettings.AppSettings("字体颜色")%>; BORDER-BOTTOM: <%=ConfigurationSettings.AppSettings("字体颜色")%> 1px solid; BACKGROUND-COLOR: <%=ConfigurationSettings.AppSettings("留言框背景色")%>;font-family:"宋体";
}
.gueststyleline{ color:<%=ConfigurationSettings.AppSettings("字体颜色")%>; background-color: <%=ConfigurationSettings.AppSettings("表格边框色")%> ;font-family: "宋体"}
.gueststylebg{color:<%=ConfigurationSettings.AppSettings("字体颜色")%>; background-color: <%=ConfigurationSettings.AppSettings("留言框背景色")%> ;font-family: "宋体"}
.gueststylerebg{ color:<%=ConfigurationSettings.AppSettings("字体颜色")%>; background-color: <%=ConfigurationSettings.AppSettings("回复框背景色")%> ;font-family: "宋体"}
.gueststylehr{color:<%=ConfigurationSettings.AppSettings("表格边框色")%>}
INPUT.TEXT 
{
BORDER-RIGHT: <%=ConfigurationSettings.AppSettings("字体颜色")%> 1px solid; 
BORDER-TOP: <%=ConfigurationSettings.AppSettings("字体颜色")%> 1px solid; 
BORDER-LEFT: <%=ConfigurationSettings.AppSettings("字体颜色")%> 1px solid; 
BORDER-BOTTOM: <%=ConfigurationSettings.AppSettings("字体颜色")%> 1px solid; 
BACKGROUND-COLOR: <%=ConfigurationSettings.AppSettings("留言框背景色")%>;
; font-style:normal
; color: <%=ConfigurationSettings.AppSettings("字体颜色")%>
; font-family: "宋体"
}
BODY{
FONT-FAMILY: "宋体"; FONT-SIZE: 9pt;
SCROLLBAR-3DLIGHT-COLOR:<%=ConfigurationSettings.AppSettings("表格边框色")%>;
SCROLLBAR-SHADOW-COLOR:<%=ConfigurationSettings.AppSettings("表格边框色")%>;
SCROLLBAR-DARKSHADOW-COLOR:<%=ConfigurationSettings.AppSettings("留言簿背景色")%>;
SCROLLBAR-FACE-COLOR:<%=ConfigurationSettings.AppSettings("留言框背景色")%>;
SCROLLBAR-ARROW-COLOR:<%=ConfigurationSettings.AppSettings("表格边框色")%>;
SCROLLBAR-TRACK-COLOR:<%=ConfigurationSettings.AppSettings("留言簿背景色")%>
; background-color:<%=ConfigurationSettings.AppSettings("留言簿背景色")%>}
A:visited {
	TEXT-DECORATION: none
}
A:active {
	TEXT-DECORATION: none
}
A:hover {
	TEXT-DECORATION: underline overline
}
A:link {
color: <%=ConfigurationSettings.AppSettings("超链接颜色")%>; text-decoration: none; font-size: 9pt
}
A:visited {
	color: <%=ConfigurationSettings.AppSettings("超链接颜色")%>; TEXT-DECORATION: none
}
A:active {
	TEXT-DECORATION: none
}
A:hover {
	TEXT-DECORATION: underline overline
}
.FILTER {
FILTER: glow(color=<%=ConfigurationSettings.AppSettings("字体颜色")%>,direction=135)
}
.replytext { 
color:<%=ConfigurationSettings.AppSettings("回复字体颜色")%>;font-family: "宋体"
}
TD,DIV,form ,OPTION,P,TD,BR{FONT-FAMILY: 宋体; FONT-SIZE: 9pt}
INPUT {
BORDER-TOP-WIDTH: 1px; PADDING-RIGHT: 1px; PADDING-LEFT: 1px; BORDER-LEFT-WIDTH: 1px; FONT-SIZE: 9pt; BORDER-LEFT-COLOR: #cccccc; BORDER-BOTTOM-WIDTH: 1px; BORDER-BOTTOM-COLOR: #cccccc; PADDING-BOTTOM: 1px; BORDER-TOP-COLOR: #cccccc; PADDING-TOP: 1px; HEIGHT: 18px; BORDER-RIGHT-WIDTH: 1px; BORDER-RIGHT-COLOR: #cccccc
}
form {margin:0; padding:0}
</style>
</head>
<body>
<form runat=server>
  <table class="gueststyleline" border="0" cellpadding="1" cellspacing="0" width="391" height="267" align="center">
    <tr> 
    <td valign="top" > 
      <table width="100%" border="0" cellpadding="0" cellspacing="0" height="100%">
        <tr> 
          <td  valign="top"> 
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="gueststyleline" height="18">
<tr> 
                  <td width="94%" height="18" align="left"><img src="Images/icon/sendmail.gif" width="16" height="16">[在线给<%=request.querystring("guestname")%>发送邮件]</td>
                  <td width="6%" align="left">
                    <div align="center"><a href="javascript:self.close()"><img src="Images/icon/close_a.gif" alt=" 关 闭 窗 口 " width="11" height="11" border="0"></a></div></td>
                </tr>
              </table>
              <table width="100%" cellpadding="1" cellspacing="0" class="gueststylebg" height="100%">
                <tr> 
                  <td height="235" valign="top"> 
                    <div align="center"><br>
                      <font color="#FF0000"> 
                      <asp:label id="message" runat=server/></font><br>
                      [目标邮件]:<%=request.querystring("mail")%><br>
                      <asp:textbox id="mailcontent" textmode="multiline" rows="10" columns="35" OnTextChanged="send_mail" runat=server/> 
                      <br><br>
                      <asp:button id="sendmail" text="发 送" class="gueststylebg" runat=server/>&nbsp; 
                      <input type="reset" id="resetform" value="重 填" class="gueststylebg" runat="server">
                    </div>
                  </td>
              </tr>
            </table>
      </table>
    </td>
  </tr>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

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