日期:2014-05-18  浏览次数:20693 次

求:java免费开源邮件服务器
因项目经费有限,所以需要免费开源邮件服务器,有谁用过?哪一个开源项目比较好?要有web界面的。谢谢了

------解决方案--------------------
http://www.open-open.com/06.htm
------解决方案--------------------
throw new Exception( "Error emailaddr type! ");
}
return mailaddr;
}

/**
* 获得邮件主题
*/
public String getSubject()throws MessagingException{
String subject = " ";
try{
subject = MimeUtility.decodeText(mimeMessage.getSubject());
if(subject == null) subject= " ";
}catch(Exception exce){
}
return subject;
}

/**
* 获得邮件发送日期
*/
public String getSentDate()throws Exception{
Date sentdate = mimeMessage.getSentDate();
SimpleDateFormat format = new SimpleDateFormat(dateformat);
return format.format(sentdate);
}

/**
* 获得邮件正文内容
*/
public String getBodyText(){
return bodytext.toString();
}

/**
* 解析邮件,把得到的邮件内容保存到一个StringBuffer对象中,解析邮件
* 主要是根据MimeType类型的不同执行不同的操作,一步一步的解析
*/
public void getMailContent(Part part)throws Exception{
String contenttype = part.getContentType();
int nameindex = contenttype.indexOf( "name ");
boolean conname =false;
if(nameindex != -1) conname=true;

System.out.println( "CONTENTTYPE: "+contenttype);
if(part.isMimeType( "text/plain ") && !conname){
bodytext.append((String)part.getContent());
}else if(part.isMimeType( "text/html ") && !conname){
bodytext.append((String)part.getContent());
}else if(part.isMimeType( "multipart/* ")){
Multipart multipart = (Multipart)part.getContent();
int counts = multipart.getCount();
for(int i=0;i <counts;i++){
getMailContent(multipart.getBodyPart(i));
}
}else if(part.isMimeType( "message/rfc822 ")){
getMailContent((Part)part.getContent());
}else{}
}

/**
* 判断此邮件是否需要回执,如果需要回执回车 "true ",否则回车 "false "
*/
public boolean getReplySign()throws MessagingException{
boolean replysign = false;
String needreply[] = mimeMessage.getHeader( "Disposition-Notification-To ");
if(needreply != null){
replysign = true;
}
return replysign;
}

------解决方案--------------------
http://www.jopener.com/category/network-servers/
中文版:
http://www.jopener.cn/category/network-servers/
------解决方案--------------------
分就送我好了,我也是顶了一把啊