Interface EmailBuilderInt

All Known Implementing Classes:
Email.EmailBuilder

public interface EmailBuilderInt
  • Method Details

    • addTo

      Email.EmailBuilder addTo(String email)
      Adds a "TO" recipient.

      This method can be called multiple times to add multiple recipients.

      Parameters:
      email - recipient email address
      Returns:
      this builder instance for chaining
    • setFrom

      Email.EmailBuilder setFrom(String email)
      Set a "FROM" sender.
      Parameters:
      email - sender email address
      Returns:
      this builder instance for chaining
    • addCc

      Email.EmailBuilder addCc(String email)
      Adds a "CC" (carbon copy) recipient.

      CC recipients are visible to all other recipients.

      This method can be called multiple times to add multiple carbon copies.

      Parameters:
      email - CC email address
      Returns:
      this builder instance for chaining
    • addBcc

      Email.EmailBuilder addBcc(String email)
      Adds a "BCC" (blind carbon copy) recipient.

      BCC recipients are hidden from other recipients.

      This method can be called multiple times to add multiple blind carbon copies.

      Parameters:
      email - BCC email address
      Returns:
      this builder instance for chaining
    • addReplyTo

      Email.EmailBuilder addReplyTo(String email)
      Adds a "Reply-To" address.

      If multiple addresses are added, all will be included in the Reply-To header.

      Parameters:
      email - reply-to email address
      Returns:
      this builder instance for chaining
    • addAttach

      Email.EmailBuilder addAttach(String name, String filePath)
      Adds an attachment using automatic content type detection.
      Parameters:
      name - file name as it will appear in the email
      filePath - path to the file in test resources
      Returns:
      this builder instance for chaining
    • addTags

      Email.EmailBuilder addTags(String tag)
      Adds a tag to the aggregated X-Tags header.

      Multiple calls will accumulate values into a single header:

       X-Tags: tag1,tag2,tag3
       
      Parameters:
      tag - tag value
      Returns:
      this builder instance for chaining
    • addHeader

      Email.EmailBuilder addHeader(String key, String value)
      Adds a custom header in <key> format.

      Example:

       addHeader("X-env", "qa") → X-env: qa
       
      Parameters:
      key - header key
      value - header value
      Returns:
      this builder instance for chaining
    • send

      void send()
      Builds and sends the email.
      Throws:
      EmailHelperException - if sending fails