Class SubmitEmailDetails.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • messageId

        public SubmitEmailDetails.Builder messageId​(String messageId)
        The unique ID for the email’s Message-ID header used for service log correlation.

        The submission will return an error if the syntax is not a valid RFC 5322 Message-ID. This will be generated if not provided. Example: sdiofu234qwermls24fd@mail.example.com

        Parameters:
        messageId - the value to set
        Returns:
        this builder
      • subject

        public SubmitEmailDetails.Builder subject​(String subject)
        A short summary of the content, which will appear in the recipient’s inbox.

        UTF-8 supported RFC 2047.

        Parameters:
        subject - the value to set
        Returns:
        this builder
      • bodyHtml

        public SubmitEmailDetails.Builder bodyHtml​(String bodyHtml)
        HTML body content in UTF-8.

        NOTE: Even though bodytext and bodyhtml are both optional, at least one of them must be provided.

        Parameters:
        bodyHtml - the value to set
        Returns:
        this builder
      • bodyText

        public SubmitEmailDetails.Builder bodyText​(String bodyText)
        Text body content.

        NOTE: Even though bodytext and bodyhtml are both optional, at least one of them must be provided.

        Parameters:
        bodyText - the value to set
        Returns:
        this builder
      • replyTo

        public SubmitEmailDetails.Builder replyTo​(List<EmailAddress> replyTo)
        The email address for the recipient to reply to.

        If left blank, defaults to the sender address.

        Parameters:
        replyTo - the value to set
        Returns:
        this builder
      • headerFields

        public SubmitEmailDetails.Builder headerFields​(Map<String,​String> headerFields)
        The header used by the customer for the email sent.

        Reserved headers are not allowed e.g “subject”, “from”, and “to” etc. Example: {“bar-key”: “value”}

        Parameters:
        headerFields - the value to set
        Returns:
        this builder