93949596979899100101102103
} boolean success = false; try{ mailSender.sendHtml(config,mailAddress ,new MailContent(ec.getSubject(),ec.getContent())); success = true; }catch( Exception e ){ ec.setErrMsg( TextFormater.format(e.getMessage(),197,true) ); }
117118119120121122123
StringBuffer content = new StringBuffer(); content.append("您在系统的登录帐号为:" + title); mailSender.send(config,mailAddress ,new MailContent("用户帮助",content.toString())); }
142143144145146147148149
content.append("\n如果点击以上链接没有反应,请将该网址复制并粘贴到新的浏览器窗口中。" ); content.append("\n"+retrieveUrl); content.append("</html>"); mailSender.sendHtml(config,mailAddress ,new MailContent("用户帮助-找回登录密码",content.toString())); }
182183184185186187188
/** * 发送带附件的文本邮件 */ public void send( ConnectionConfig conf, MailAddress mailAddress, String mailtext, Attachment attachment){ this.send(conf, mailAddress, new MailContent("", mailtext), new Attachment[]{ attachment }); }