Package com.avaje.ebeaninternal.server.lib.util

Examples of com.avaje.ebeaninternal.server.lib.util.MailMessage


    String fromUser = GlobalProperties.get("datasource.alert.fromuser", null);
    String fromEmail = GlobalProperties.get("datasource.alert.fromemail", null);
    String toEmail = GlobalProperties.get("datasource.alert.toemail", null);
   
    MailMessage data = new MailMessage();
    data.setSender(fromUser, fromEmail);
    data.addBodyLine(msg);
    data.setSubject(subject);

    String[] toList = toEmail.split(",");
    if (toList.length == 0) {
      throw new RuntimeException("alert.toemail has not been set?");
    }
    for (int i = 0; i < toList.length; i++) {
      data.addRecipient(null, toList[i].trim());
    }

    MailSender sender = new MailSender(mailServerName);
    sender.setMailListener(this);
    sender.sendInBackground(data);
View Full Code Here

TOP

Related Classes of com.avaje.ebeaninternal.server.lib.util.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.