Package org.apache.commons.mail

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


                    .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


          email.setReplyTo(createInternetAddressesList(replyTo));
       
        email.setSubject(subject);
        email.setMsg(content);
 
        email.send();
    }
      catch (Exception e)
      {
        logger.error("An error occurred when we tried to send this mail:" + e.getMessage(), e);
      }
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

            //configuracao gmailç
            mailer.setSmtpPort(465)
            mailer.setSSL(true)
            mailer.setTLS(true)

            mailer.send();
           
            messageContext.add("Contato realizado com sucesso.", SeverityType.INFO);
        } catch (EmailException ex) {
            messageContext.add("Erro ao Enviar E-mail", SeverityType.ERROR);
            Logger.getLogger(ContatoSiteMB.class.getName()).log(Level.SEVERE, null, ex);
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.