java mail Ïà¹Ø
¡¾ÉùÃ÷¡¿×ªÌûµØÖ· £º http://tech.ddvip.com/2009-04/1239788309115180.html
MailSenderInfo .java :
package com.util.mail;
import java.util.Properties;
/**
* @author AllanKing
* @date 2009-11-12
*/
public class MailSenderInfo {
// ·¢ËÍÓʼþµÄ·þÎñÆ÷µÄIPºÍ¶Ë¿Ú
private String mailServerHost;
private String mailServerPort = "25";
// Óʼþ·¢ËÍÕߵĵØÖ·
private String fromAddress;
// Óʼþ½ÓÊÕÕߵĵØÖ·
private String toAddress;
// µÇ½Óʼþ·¢ËÍ·þÎñÆ÷µÄÓû§ÃûºÍÃÜÂë
private String userName;
private String password;
// ÊÇ·ñÐèÒªÉí·ÝÑéÖ¤
private boolean validate = false;
// ÓʼþÖ÷Ìâ
private String subject;
// ÓʼþµÄÎı¾ÄÚÈÝ
private String content;
// Óʼþ¸½¼þµÄÎļþÃû
private String[] attachFileNames;
/** */
/**
* »ñµÃÓʼþ»á»°ÊôÐÔ
*/
public Properties getProperties() {
Properties p = new Properties();
p.put("mail.smtp.host", this.mailServerHost);
p.put("mail.smtp.port", this.mailServerPort);
p.put("mail.smtp.auth", validate ? "true" : "false");
if(this.mailServerHost.indexOf("smtp.gmail.com")>=0)//¹ØÓÚgmailµÄssl·ÃÎʱ¨´íµÄ´¦Àí
{
p.setProperty("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
p.setProperty("mail.smtp.socketFactory.fallback", "false");
p.setProperty("mail.smtp.port", "465");
p.setProperty("mail.smtp.socketFactory.port", "465");
}
return p;
}
public String getMailServerHost() {
return mailServerHost;
}
public void setMailServerHost(String mailServerHost) {
this.mailServerHost = mailServerHost;
}
public String getMailServerPort() {
return mailServerPort;
}
public void setMailServerPort(String mailServerPort) {
this.mailServerPort = mailServerPort;
}
public boolean isValidate() {
return validate;
}
public void setValidate(boolean validate) {
this.validate = validate;
}
public String[] getAttachFileNames() {
return attachFileNames;
}
public void setAttachFi
Ïà¹ØÎĵµ£º
ÏÖÔÚ£¬Ì¸ÔƼÆËãµÄ¿É¶àÁË£¬²»¹ý£¬Ò»°ã±È½Ï¹Ø×¢µÄÊÇGoogleºÍAmazonµÄÔÆ·þÎñ¡£´Ó´ó·¶Î§À´¿´£¬Ò²Ö»ÓÐÕâÁ½¼Ò»ñµÃÁ˹«Öڵĸü¶à¹Ø×¢¡£±ÈÈ磬ÎÒ¸öÈ˺ܸÐÐËȤµÄ£¬¾ÍÊÇGoogleµÄApp EngineʹÓû§Äܹ»ÔÚGoogle»ù´¡ÉèÊ©ÉϹ¹½¨ºÍÍÐ¹Ü Web Ó¦ÓóÌÐò¡£ÖÁÓÚAmazon£¬ËüµÄAmazonWeb Services»¹°üÀ¨Elastic Cloud Compute (EC2)¼ÆËãWeb·þ ......
1¡¢ Web.xml
1£© ÅäÖÃhibernate
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/dbConnectionContext.xml /WEB-INF/serviceContext.xml</param-value> ......
תÔØ×Ôhttp://blog.csdn.net/yuekun1172006/archive/2007/06/02/1634878.aspx
Àà×°ÈëÆ÷ÊÇ JVM ÓÃÀ´×°ÈëÀàµÄÀ࣬Ëü¶ÔÓÚ Java ±à³ÌÊǷdz£ÖØÒªµÄÒ»¸ö¸ÅÄî¡£Ò»°ãÇé¿öÏ£¬³ÌÐòÔ±ÔÚ±àд³ÌÐòµÄʱºò¶¼¿ÉÒÔºöÂÔÀà×°ÈëÆ÷µÄ´æÔÚÐÔ¡£µ«ÊǶÔÓÚ·þÎñÆ÷¶Ë±à³Ì»òÕßÊÇһЩÌØÊâÇé¿öÏÂʱºò£¬ÉîÈëÁ˽âÀà×°ÈëÆ÷µÄ»úÖÆÒÔ¼°ÆäÔÚ²»Í¬Çé¿öϵ ......
¶ÔÓÚ10½øÖÆÊýת»»ÎªN£¨2-36£©½øÖÆÒ»°ã¶¼ÊÇÑ¡ÔñÈ¡Óà³ýµÄËã·¨½øÐÐת»» £¬ÏÂÃæ¸ø³öÁ½ÖÖ·½°¸
Ò»ÖÖÊǵݹ飬һÖÖÊǵü´ú¡£Í¨¹ýЧÂÊÆÀ¼ÛÁ½ÕßÐÔÄÜ
ÆäÖеü´úµÄ·½°¸Ö±½ÓÈ¡×ÔjavaÔ´´úÂë¡£
/*
*Class NotationConvert.java
*Create Date: 2009-11-12
*Author:a276202460
*/
package com.rich.notation;
public class Notat ......