Properties props = new Properties();
props.put("mail.smtp.host", host);
props.put("mail.smtp.ehlo", ehlo);
props.put("mail.smtp.auth", auth);
System.out.println("in try"); Session session = Session.getDefaultInstance(props,null);
if(session==null){
System.out.println("error");
} session.setDebug(debugFlag);
MimeMessage msg = new MimeMessage(session);呵呵,剪一代码出来,在sun的j2ee下发邮件一切正常!!!
props.put("mail.smtp.host", host);
props.put("mail.smtp.ehlo", ehlo);
props.put("mail.smtp.auth", auth);
System.out.println("in try"); Session session = Session.getDefaultInstance(props,null);
if(session==null){
System.out.println("error");
} session.setDebug(debugFlag);
MimeMessage msg = new MimeMessage(session);呵呵,剪一代码出来,在sun的j2ee下发邮件一切正常!!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货