Package org.apache.commons.mail

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


      addBcc(email, bccStr);
      setSubject(email, subjectStr);
      setMailServerProperties(email);
      setCharset(email, charSetStr);
 
      email.send();
     
    } catch (ActivitiException e) {
      handleException(execution, e.getMessage(), e, doIgnoreException, exceptionVariable);
    } catch (EmailException e) {
      handleException(execution, "Could not send e-mail in execution " + execution.getId(), e, doIgnoreException, exceptionVariable);
View Full Code Here


      // typically the case for most modern mail servers.
      email.setStartTLSEnabled(true);
    }
    email.setSocketConnectionTimeout(settings.getConnectionTimeout());
    email.setSocketTimeout(settings.getSocketTimeout());
    email.send();

    if (LOG.isTraceEnabled()) {
      LOG.trace("email sent to " + smtpMessage.getTo());
    }
  }
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

                    .append(" password: ").append(unencodedPassword);

            email.setMsg(messageBuilder.toString());

            email.addTo(sendToEmail, emailDetail.getContactName());
            email.send();
        } catch (final EmailException e) {
            throw new PlatformEmailSendException(e);
        }
    }
}
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

      try {
        email.setFrom(from);
        email.addTo(to);
        if(!StringUtils.isEmpty(subject)) email.setSubject(subject);
        if(!StringUtils.isEmpty(message)) email.setMsg(message);
        email.send();
        logger.debug("Sent email to '{}' with subject '{}'.", to, subject);
        success = true;
      } catch (EmailException e) {
        logger.error("Could not send e-mail to '" + to + "‘.", e);
      }
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.