Class SmtpWhoEmailSender

java.lang.Object
org.jwcarman.who.email.smtp.SmtpWhoEmailSender
All Implemented Interfaces:
WhoEmailSender

public class SmtpWhoEmailSender extends Object implements WhoEmailSender
Sends who's emails over SMTP through Spring's JavaMailSender: a text-only message, or a multipart one with the HTML as an alternative to the text when the email has HTML.
  • Constructor Details

    • SmtpWhoEmailSender

      public SmtpWhoEmailSender(org.springframework.mail.javamail.JavaMailSender mailSender, String from)
      Creates the sender.
      Parameters:
      mailSender - sends the messages
      from - the address every email comes from
  • Method Details

    • send

      public void send(OutgoingEmail email)
      Sends the email.
      Specified by:
      send in interface WhoEmailSender
      Parameters:
      email - the rendered email
      Throws:
      org.springframework.mail.MailException - if it could not be built or sent