Package org.apache.commons.mail

Examples of org.apache.commons.mail.Email.send()


            if (html) {
                ((HtmlEmail) email).setHtmlMsg(content);
            } else {
                email.setMsg(content);
            }
            email.send();
        } catch (Exception exception) {
            logger.error(exception);
            if (DEBUG) {
                System.out.println(exception.getMessage());
                exception.printStackTrace();
View Full Code Here


        StringBuilder body = new StringBuilder();
        body.append(buildBody(stream, checkResult, backlog));
        email.setMsg(body.toString());
        email.addTo(emailAddress);

        email.send();
    }

    protected String buildSubject(Stream stream, AlertCondition.CheckResult checkResult, Configuration config, List<Message> backlog) {
        StringBuilder sb = new StringBuilder();
View Full Code Here

    setSubject(email, subjectStr);
    setMailServerProperties(email);
    setCharset(email, charSetStr);

    try {
      email.send();
    } catch (EmailException e) {
      throw new ProcessEngineException("Could not send e-mail", e);
    }
    leave(execution);
  }
View Full Code Here

    }
        email.setFrom(from, "Wookie Server");
        email.setSubject("Wookie API Key");
        email.setMsg(message);
        email.addTo(to);
        email.send();
  }

}
View Full Code Here

            if (options.getReplyToEmail() != null)
            {
                email.setReplyTo(Arrays.asList(new InternetAddress(options.getReplyToEmail())));
            }

            email.send();
        }
        catch (EmailException e)
        {
            log.error("Unable to send email", e);
            if (log.isDebugEnabled())
View Full Code Here

    }
        email.setFrom(from, "Wookie Server");
        email.setSubject("Wookie API Key");
        email.setMsg(message);
        email.addTo(to);
        email.send();
  }

}
View Full Code Here

    }
        email.setFrom(from, "Wookie Server");
        email.setSubject("Wookie API Key");
        email.setMsg(message);
        email.addTo(to);
        email.send();
  }

}
View Full Code Here

    }
        email.setFrom(from, "Wookie Server");
        email.setSubject("Wookie API Key");
        email.setMsg(message);
        email.addTo(to);
        email.send();
  }

}
View Full Code Here

            for (String to : details.getTo()) {
                email.addTo(to);
            }
            email.setFrom(details.getFrom());

            email.send();
        } catch (EmailException ex) {
            logger.error("Exception occurred when sending email to " + details.getTo(), ex);
        }
    }
View Full Code Here

    setSubject(email, subjectStr);
    setMailServerProperties(email);
    setCharset(email, charSetStr);

    try {
      email.send();
    } catch (EmailException e) {
      throw new ActivitiException("Could not send e-mail", e);
    }
    leave(execution);
  }
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.