📄 send.jsp
字号:
<%@ page language="java" contentType="text/html;charset=gb2312" %>
<%@ page import="service.Mail" %>
<%
String strFrom="";
if (request.getParameter("from")!=null)
strFrom=request.getParameter("from");
%>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" content="text/html; charset=gb_2312-80">
<TITLE>邮件发送</TITLE>
</HEAD>
<style type="text/css">
<!--
p { font-family: "宋体"; font-size: 9pt;}
td {font-size: 9pt ; line-height:normal; }
A{text-transform: none; text-decoration: none; font-size: 9pt;}
a:hover {text-decoration:underline; font-size: 9pt}
body { font-size: 9pt}
.mjMenuLink {
text-decoration: none;
CURSOR: hand;
}
-->
</style>
<BODY leftmargin="0" topmargin="0">
<FORM ACTION="" METHOD=POST NAME="f1">
<table width="98%" border="0" bgColor="#93BEE2" style="BORDER-LEFT: #93BEE2 4px solid; BORDER-RIGHT: #93BEE2 4px solid; BORDER-TOP: #93BEE2 4px solid; BORDER-BOTTOM: #93BEE2 4px solid" align="center" cellspacing="0">
<tr>
<td height="30" colspan="2" align="center"> 新邮件发送
<hr size="1" noshade></td>
</tr>
<tr>
<td colspan="2"> <table cellspacing=0 cellpadding=2>
<tbody>
<tr>
<td noWrap align=right><b><font class=s>收件人</font> : </b></td>
<td width="100%"> <input name="to" type="text" class='textbox' id="to" value="<%=strFrom%>" size="48"></td>
<td valign=top
rowspan=4> </td>
</tr>
<tr>
<td noWrap align=right><b><font class=s>抄送</font> : </b></td>
<td> <input name="cc" type="text" class='textbox' id="cc" size="48"></td>
</tr>
<tr>
<td noWrap align=right><b><font class=s>暗送</font> : </b></td>
<td> <input name="bcc" type="text" class='textbox' id="bcc" size="48"></td>
</tr>
<tr>
<td noWrap align=right><b>主题 : </b></td>
<td> <input name="subject" type="text" class='textbox' id="subject" size="48">
</td>
</tr>
<tr>
<td noWrap colspan="3" align=left id="cert_check"></td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td colspan="2"> <textarea name="text" cols="76" rows="12" class='textarea' id="text"></textarea>
</td>
</tr>
<tr>
<td colspan="2" height="40" style="BORDER-BOTTOM: #6F91AB 1px solid"><div align="center">
<input type="radio" name="ishtml" value="1" id="ishtml1">
<label for="ishtml1">使用HTML语法</label>
<input name="ishtml" type="radio" id="ishtml0" value="0" checked>
<label for="ishtml0">不使用HTML语法</label>
</div></td>
</tr>
<tr>
<td colspan="2" height="40" style="BORDER-BOTTOM: #6F91AB 1px solid">附件1:
<input name="file1" type="file" size="50"></td>
</tr>
<tr>
<td colspan="2" height="40" style="BORDER-BOTTOM: #6F91AB 1px solid">附件2:
<input name="file12" type="file" size="50"></td>
</tr>
<tr>
<td colspan="2" height="40" align="right" style="BORDER-BOTTOM: #6F91AB 1px solid">
<input type="submit" name="submit" value="发送" style="WIDTH: 80px" class=Bsbttn >
<input type="button" value="取消" style="WIDTH: 80px" onclick="javascript:parent.location.href='viewmailbox.asp?GRSN=9826455'" class=Bsbttn>
</td>
</tr>
</table>
<br>
</FORM>
</BODY>
</HTML>
<%
if (request.getParameter("submit")!=null){
java.util.Properties props=new java.util.Properties();
String strFiles="";
props.put("mail.smtp.from",session.getAttribute("from").toString());
props.put("mail.smtp.to",request.getParameter("to"));
props.put("mail.smtp.subject",request.getParameter("subject"));
if (request.getParameter("file1")!=null)
strFiles=strFiles+request.getParameter("file1")+",";
if (request.getParameter("file2")!=null)
strFiles=strFiles+request.getParameter("file2")+",";
if (strFiles.length()>0)
strFiles.substring(0,strFiles.length()-1);
props.put("mail.smtp.files",strFiles);
if (request.getParameter("cc")!=null)
props.put("mail.smtp.cc",request.getParameter("cc"));
if (request.getParameter("bcc")!=null)
props.put("mail.smtp.bcc",request.getParameter("bcc"));
props.put("mail.smtp.ishtml",request.getParameter("ishtml"));
props.put("mail.smtp.text",request.getParameter("text"));
props.put("mail.smtp.host",session.getAttribute("smtp").toString());
props.put("mail.smtp.auth","true");
props.put("mail.smtp.user",session.getAttribute("user").toString());
props.put("mail.smtp.password",session.getAttribute("pwd").toString());
Mail pmm = new Mail();
pmm.startSend(props);
%>
<script language="JavaScript">
alert("发送成功!");
history.go(-1);
</script>
<%
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -