Class Email

java.lang.Object
io.micronaut.email.Email
All Implemented Interfaces:
Recipients

@Introspected public final class Email extends Object implements Recipients
Representation of a transactional email.
Since:
1.0.0
Author:
Sergio del Amo
  • Method Details

    • getFrom

      @NonNull public @NonNull Contact getFrom()
      Returns this email "From" address.
      Returns:
      this email "From" address.
    • getReplyTo

      @Nullable public @Nullable Contact getReplyTo()
      Returns this email's "Reply-To" address.

      Note: If this email has more than one, this method will return the last one added.

      Returns:
      this email's "Reply-To" address.
    • getReplyToCollection

      @Nullable public @Nullable Collection<@Valid Contact> getReplyToCollection()
      Returns this email's "Reply-To" addresses.
      Returns:
      this email's "Reply-To" addresses.
    • getTo

      @Nullable public @Nullable Collection<Contact> getTo()
      Returns this email's "To" addresses.
      Specified by:
      getTo in interface Recipients
      Returns:
      this email's "To" addresses.
    • getCc

      @Nullable public @Nullable Collection<Contact> getCc()
      Returns this email's "CC" addresses.
      Specified by:
      getCc in interface Recipients
      Returns:
      this email's "CC" addresses.
    • getBcc

      @Nullable public @Nullable Collection<Contact> getBcc()
      Returns this email's "BCC" addresses.
      Specified by:
      getBcc in interface Recipients
      Returns:
      this email's "BCC" addresses.
    • getSubject

      @NonNull public @NonNull String getSubject()
      Returns this email's subject.
      Returns:
      this email's subject.
    • getAttachments

      @Nullable public @Nullable List<Attachment> getAttachments()
      Returns this email's attachments.
      Returns:
      this email's attachments.
    • getBody

      @Nullable public @Nullable Body getBody()
      Returns this email's body.
      Returns:
      this email's body.
    • builder

      @NonNull public static Email.Builder builder()
      Returns:
      Builder