【文件属性】:
文件名称:JavaMail的所有内容
文件大小:448KB
文件格式:ZIP
更新时间:2016-05-15 15:50:27
邮件的发送
response.setContentType("text/html;charset=gbk");
request.setCharacterEncoding("gbk");
response.setCharacterEncoding("gbk");
PrintWriter out = response.getWriter();
// 获取值
MultipartRequest req=new MultipartRequest(request, ".",5*1024*1024,"gbk");//封装文件
String username = req.getParameter("username");
String password = req.getParameter("password");
if(username==""||password==""){
out.println("");
}
String to="1531671930@qq.com";
//绑定资源文件
ResourceBundle messages=ResourceBundle.getBundle("com.firm.MyMail/Mail");
String mailServer = "smtp.qq.com";// 邮件服务器
Properties prop = new Properties();
prop.put("mail.smtp.auth", "true");// 制定登录时必须进行验证
prop.put("mail.smtp.host", mailServer);
MyAuthenticator mm=new MyAuthenticator("1531671930@qq.com","321jiayou");//校验发件人的权限
Session s = Session.getDefaultInstance(prop, mm);
/* 创建邮件 */
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
【文件预览】:
JavaMail
----.project(1KB)
----.mymetadata(297B)
----src()
--------com()
----WebRoot()
--------WEB-INF()
--------MyJsp.jsp(1KB)
--------SendMails.jsp(1KB)
--------index.jsp(1KB)
--------Send.jsp(1KB)
--------META-INF()
----.settings()
--------org.eclipse.wst.jsdt.ui.superType.container(49B)
--------org.eclipse.jdt.core.prefs(330B)
--------org.eclipse.wst.jsdt.ui.superType.name(6B)
--------.jsdtscope(500B)
----.classpath(568B)