Examples of SimpleEmail


Examples of pt.opensoft.mail.SimpleEmail

        setStatus(CANCELED);
        nextRunTime = null;
    }

    private void warnExceptionByEmail(Exception e) {
      SimpleEmail email = new SimpleEmail(this.mailSmtp);
      try {
            email.setFrom(this.mailFrom, getName());
        for (int i = 0; i < this.mailsTo.size(); i++) {
          email.addTo((String)mailsTo.get(i));
        }
        email.setSubject(getName() + " Exception: " + e.getMessage());
        StringBuffer message = new StringBuffer();
        message.append("Foi lan�ada uma excep��o pelo Daemon " + getName() + " causando o fim da sua execu��o � seguinte data: " + new DateTime(new java.util.Date()));
        message.append("\n\nStack Trace:\n");
        message.append("\t" + StringUtil.toString(e));
            email.setMsg(message.toString());
            email.send();
        } catch (Exception mailException) {
            logger.warning("Error sending exception mail: " + mailException);
        }
  }
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.