Examples of MailUtil


Examples of com.founder.fix.fixflow.core.impl.util.MailUtil

      try {
        FixMailTo fixMailTo = new FixMailTo();
        fixMailTo.persistentInit(mapData);

        MailUtil mailUtil = new MailUtil();
        mailUtil.setSmtpHost(mailInfoObj.getSmtpHost(), StringUtil.getInt(mailInfoObj.getSmtpPort()));
        mailUtil.setSmtpAuthentication(mailInfoObj.getUserName(), mailInfoObj.getPassWord());
        // 支持发送多人邮件 #4185
        String to = fixMailTo.getMailTo();
        if (to == null || to.equals("")) {
          throw new FixFlowBizException("mailTo is null");
        }
        String[] str = to.split(",");
        List<String> userMailToList=new ArrayList<String>();
        for (String userMail : str) {
         
          if(userMail==null||userMail.equals("")||userMail.trim().equals("")){
           
          }
          else{
            userMailToList.add(userMail);
          }
         
         
         
         
        }
       
        if(userMailToList.size()==0){
          throw new FixFlowBizException("Mail toaddress is null");
        }
        String[] userMailToFinStrings=(String[])userMailToList.toArray(new String[userMailToList.size()]);
       
       
        mailUtil.setTo(userMailToFinStrings);
       
       
       
       
       
        String cc = fixMailTo.getMailCc();
        if (cc != null && !cc.equals("")) {
          String[] strCC = cc.split(",");
         
          List<String> userMailCCList=new ArrayList<String>();
          for (String userMail : strCC) {
           
            if(userMail==null||userMail.equals("")||userMail.trim().equals("")){
             
            }
            else{
              userMailCCList.add(userMail);
            }
           
          }
         
          if(userMailCCList.size()==0){
            throw new FixFlowBizException("Mail ccaddress is null");
          }
         
          String[] userMailCCFinStrings=(String[])userMailCCList.toArray(new String[userMailCCList.size()]);
     
         
         
         
          mailUtil.setCC(userMailCCFinStrings);
        }
        String title = fixMailTo.getMailSubject();
        String mailContent = fixMailTo.getMailBody();

        mailUtil.setFrom(mailInfoObj.getMailAddress());
        mailUtil.setSubject(title);
        mailUtil.setBody(mailContent);
        mailUtil.setContentType(mailUtil.MODE_HTML);
       

        Map<String, Object> objectParam = new HashMap<String, Object>();
        objectParam.put("MAIL_STATUS", MailStatus.COMPLETE.toString());

        // 构建Where查询参数
        Object[] objectParamWhere = { StringUtil.getString(mapData.get("MAIL_ID")) };

        sqlCommand.update("FIXFLOW_MAIL", objectParam, " MAIL_ID=?", objectParamWhere);
       
   
        // 异步发送
        mailUtil.send();

      } catch (Exception e) {

        try {
          Map<String, Object> objectParam = new HashMap<String, Object>();
View Full Code Here

Examples of kr.pe.okjsp.util.MailUtil

        + member.getId() + "'\n"
      + "\nYour temporary password : " + member.getPassword()
      + "\nAfter login you can change your password as you like."
      + "\n" + Navigation.getPath("LOGFORM")
      + "\n\nJSP/Eclipse developer community http://www.okjsp.net ";
    new MailUtil().send(mailto, subject, textMessage);
  }
View Full Code Here

Examples of kr.pe.okjsp.util.MailUtil

        + email + "&t=" + token + "\">��й�ȣ �����ϱ�</a><br />";

    String success;
    String message;
    try {
      new MailUtil().send(mailto, subject, textMessage,
          "text/html; charset=euc-kr");
      success = "true";
      message = email + "�� ������ �߼��߽��ϴ�.";
    } catch (Exception e) {
      System.out.println(e.toString() + "\nfailed: " + email);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.