Examples of EmailException


Examples of org.apache.commons.mail.EmailException

    String queryString = "";
    if (req.getMethod().equals("GET")){
      queryString = (String) req.getAttribute(REQUEST_PARAMETERS);
    }
    if (!env.has(TARGET_MAILING_LIST)) {
      throw new EmailException(noMailingListMessage());
    }
    String mailingList = env.get(TARGET_MAILING_LIST);
    String from = env.get(SIMPLE_MAIL_FROM);
    String fromName = env.get(SIMPLE_MAIL_FROM_NAME);
    String headers = getHeaders();
View Full Code Here

Examples of org.apache.commons.mail.EmailException

      try {
        client.sendRawEmail(new SendRawEmailRequest()
            .withRawMessage(mail2Content(email)));
      } catch (Exception e) {
        throw new EmailException(e);
      }
    } else {
      new MockMailer().send(email);
    }
  }
View Full Code Here

Examples of org.apache.commons.mail.EmailException

      try {
        client.sendRawEmail(new SendRawEmailRequest()
            .withRawMessage(mail2Content(email)));
      } catch (Exception e) {
        throw new EmailException(e);
      }
    } else {
      new MockMailer().send(email);
    }
  }
View Full Code Here

Examples of org.apache.commons.mail.EmailException

      try {
        client.sendRawEmail(new SendRawEmailRequest()
            .withRawMessage(mail2Content(email)));
      } catch (Exception e) {
        throw new EmailException(e);
      }
    } else {
      new MockMailer().send(email);
    }
  }
View Full Code Here

Examples of org.apache.rave.exception.EmailException

            return FreeMarkerTemplateUtils.processTemplateIntoString(configuration.getTemplate(templateName), templateData);
        } catch (IOException e) {
            if (log.isDebugEnabled()) {
                log.error("Error parsing email template" + templateName, e);
            }
            throw new EmailException("Username reminder: error parsing email template" + templateName);
        } catch (TemplateException e) {
            if (log.isDebugEnabled()) {
                log.error("failed to render email template " + templateName, e);
            }
            throw new EmailException("Username reminder: error rendering email template: " + templateName);
        }
    }
View Full Code Here

Examples of org.broadleafcommerce.common.email.service.exception.EmailException

    public void onMessage(Message message) {
        try {
            HashMap props = (HashMap) ((ObjectMessage) message).getObject();
            messageCreator.sendMessage(props);
        } catch (MailAuthenticationException e) {
            throw new EmailException(e);
        } catch (MailPreparationException e) {
            throw new EmailException(e);
        } catch (MailParseException e) {
            throw new EmailException(e);
        } catch (MailSendException e) {
            /*
             * TODO find the specific exception that results from the smtp
             * server being down, and throw this as an EmailException.
             * Otherwise, log and then swallow this exception, as it may have
             * been possible that this email was actually sent.
             */
            throw new EmailException(e);
        } catch (JMSException e) {
            throw new EmailException(e);
        }
    }
View Full Code Here

Examples of org.broadleafcommerce.common.email.service.exception.EmailException

        props.put(EmailPropertyType.INFO.getType(), emailInfo);
        props.put(EmailPropertyType.USER.getType(), emailTarget);

        if (Boolean.parseBoolean(emailInfo.getSendEmailReliableAsync())) {
            if (emailServiceProducer == null) {
                throw new EmailException("The property sendEmailReliableAsync on EmailInfo is true, but the EmailService does not have an instance of JMSEmailServiceProducer set.");
            }
            emailServiceProducer.send(props);
        } else {
            messageCreator.sendMessage(props);
        }
View Full Code Here

Examples of org.keycloak.email.EmailException

            String subject =  theme.getMessages().getProperty(subjectKey);
            String body = freeMarker.processTemplate(attributes, template, theme);

            send(subject, body);
        } catch (Exception e) {
            throw new EmailException("Failed to template email", e);
        }
    }
View Full Code Here

Examples of org.keycloak.email.EmailException

                transport.connect();
            }
            transport.sendMessage(msg, new InternetAddress[]{new InternetAddress(address)});
        } catch (Exception e) {
            log.warn("Failed to send email", e);
            throw new EmailException(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.