pop3_sendmail_do.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:2k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8" %>
  2. <%@ page import="java.util.*"%>
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <title>
  7. 发送邮件
  8. </title>
  9. <link href="../common.css" rel="stylesheet" type="text/css">
  10. </head>
  11. <body>
  12. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil" />
  13. <jsp:useBean id="sendmail" scope="page" class="com.redmoon.oa.emailpop3.SendMail" />
  14. <jsp:useBean id="userservice" scope="page" class="com.redmoon.oa.person.UserService"/>
  15. <table width="564" border="0" align="center" cellpadding="0" cellspacing="0">
  16.   <tr> 
  17.     <td height="23" class="right-title">&nbsp;&nbsp;发 
  18.       邮 件</td>
  19.   </tr>
  20.   <tr> 
  21.     <td valign="top"></p></td>
  22.   </tr>
  23.   <tr> 
  24.     <td height="9"><table width="100%" border="0" align="center" cellpadding="3" cellspacing="0" class="tableframe">
  25.       <tr>
  26.         <td height="176" align="center" bgcolor="#FFFFFF"><jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  27.           
  28.             <%
  29. String priv="read";
  30. if (!privilege.isUserPrivValid(request,priv))
  31. {
  32. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  33. return;
  34. }
  35. %>
  36.             <%
  37. sendmail.getMailInfo(application, request);
  38. if (sendmail.send())
  39.    out.println("邮件发送成功!");
  40. else
  41. {
  42.    out.println("邮件发送失败,原因是:"+sendmail.geterrinfo());
  43. }
  44. %>
  45.             <br>
  46.         </td>
  47.       </tr>
  48.     </table></td>
  49.   </tr>
  50. </table>
  51. </body>
  52. </html>