Interface EmailMessage.Builder

  • Method Details

    • body

      The body of the email message.

      Parameters:
      body - The body of the email message.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • feedbackForwardingAddress

      EmailMessage.Builder feedbackForwardingAddress(String feedbackForwardingAddress)

      The email address to forward bounces and complaints to, if feedback forwarding is enabled.

      Parameters:
      feedbackForwardingAddress - The email address to forward bounces and complaints to, if feedback forwarding is enabled.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • fromAddress

      EmailMessage.Builder fromAddress(String fromAddress)

      The verified email address to send the email message from. The default value is the FromAddress specified for the email channel.

      Parameters:
      fromAddress - The verified email address to send the email message from. The default value is the FromAddress specified for the email channel.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • rawEmail

      EmailMessage.Builder rawEmail(RawEmail rawEmail)

      The email message, represented as a raw MIME message.

      Parameters:
      rawEmail - The email message, represented as a raw MIME message.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • rawEmail

      default EmailMessage.Builder rawEmail(Consumer<RawEmail.Builder> rawEmail)

      The email message, represented as a raw MIME message.

      This is a convenience method that creates an instance of the RawEmail.Builder avoiding the need to create one manually via RawEmail.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to rawEmail(RawEmail).

      Parameters:
      rawEmail - a consumer that will call methods on RawEmail.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • replyToAddresses

      EmailMessage.Builder replyToAddresses(Collection<String> replyToAddresses)

      The reply-to email address(es) for the email message. If a recipient replies to the email, each reply-to address receives the reply.

      Parameters:
      replyToAddresses - The reply-to email address(es) for the email message. If a recipient replies to the email, each reply-to address receives the reply.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • replyToAddresses

      EmailMessage.Builder replyToAddresses(String... replyToAddresses)

      The reply-to email address(es) for the email message. If a recipient replies to the email, each reply-to address receives the reply.

      Parameters:
      replyToAddresses - The reply-to email address(es) for the email message. If a recipient replies to the email, each reply-to address receives the reply.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • simpleEmail

      EmailMessage.Builder simpleEmail(SimpleEmail simpleEmail)

      The email message, composed of a subject, a text part, and an HTML part.

      Parameters:
      simpleEmail - The email message, composed of a subject, a text part, and an HTML part.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • simpleEmail

      default EmailMessage.Builder simpleEmail(Consumer<SimpleEmail.Builder> simpleEmail)

      The email message, composed of a subject, a text part, and an HTML part.

      This is a convenience method that creates an instance of the SimpleEmail.Builder avoiding the need to create one manually via SimpleEmail.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to simpleEmail(SimpleEmail).

      Parameters:
      simpleEmail - a consumer that will call methods on SimpleEmail.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • substitutions

      EmailMessage.Builder substitutions(Map<String,? extends Collection<String>> substitutions)

      The default message variables to use in the email message. You can override the default variables with individual address variables.

      Parameters:
      substitutions - The default message variables to use in the email message. You can override the default variables with individual address variables.
      Returns:
      Returns a reference to this object so that method calls can be chained together.