Package com.etown.util.email

Examples of com.etown.util.email.MailMessage


    sender.setPort(25);
    sender.setUserName("damoqiongqiu");
    sender.setPassWord("xiaotao015001024");
    sender.setMailFrom("damoqiongqiu@126.com");
   
    MailMessage mail1 = new MailMessage();
    boolean mailSuccess=false;
    try {
      mail1.setMailFrom(sender.getMailFrom());
      mail1.setMailTo(email);
      mail1.setMaiSubject("来自忆唐的验证邮件");
     
      String filePath = System.getProperty("web.home")+System.getProperty("regTplHtml");
      String content=FileUtil.readAll(filePath);
      content=StringUtil.format(content, new String[]{nickName,userName,validateCode});
      mail1.setContent(content);
      mail1.saveChanges();
      mailSuccess=sender.send(mail1);
    } catch (Exception e) {
      log.error("发送验证邮件失败");
      mailSuccess=false;
    }
View Full Code Here

TOP

Related Classes of com.etown.util.email.MailMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.