Interface EmailMessage

All Known Implementing Classes:
HtmlEmailMessage, TextEmailMessage

public interface EmailMessage
Represents an email message
Since:
v3.3.0
  • Method Details

    • getFrom

      Optional<javax.mail.internet.InternetAddress> getFrom()
      Returns:
      Address of sender of this email, if overridden; by default sender is configured globally for the instance
    • getRecipientAddress

      @Nullable default javax.mail.internet.InternetAddress getRecipientAddress()
      Deprecated.
      since 3.7 use getTo() as it's possible to have multiple recipients of a single e-mail
      Returns:
      Address of recipient of the email message
    • getTo

      Collection<javax.mail.internet.InternetAddress> getTo()
      Returns:
      Recipients of this e-mail of type "To" (primary recipients)
      Since:
      3.7
    • getCc

      Collection<javax.mail.internet.InternetAddress> getCc()
      Returns:
      Recipients of this e-mail of type "Cc" (carbon copy)
      Since:
      3.7
    • getBcc

      Collection<javax.mail.internet.InternetAddress> getBcc()
      Returns:
      Recipients of this e-mail of type "Bcc" (blind carbon copy)
      Since:
      3.7
    • getReplyTo

      Collection<javax.mail.internet.InternetAddress> getReplyTo()
      Returns:
      Addresses sent as "Reply-to".
      Since:
      3.7
    • getBody

      String getBody()
      Returns:
      Body of the email message
    • getSubject

      String getSubject()
      Returns:
      Subject of the email message
    • getHeaders

      Map<String,String> getHeaders()
      Returns:
      Headers of the email message
    • getAttachments

      Map<String,javax.activation.DataSource> getAttachments()
      Returns:
      Attachments of the email message