Class EmailMessage

java.lang.Object
com.azure.communication.email.models.EmailMessage

public final class EmailMessage extends Object
Message payload for sending an email.
  • Constructor Details

    • EmailMessage

      public EmailMessage(String sender, EmailContent content)
      Constructor for EmailMessage
      Parameters:
      sender - the sender email address from a verified domain
      content - the email content to be sent
  • Method Details

    • getCustomHeaders

      public List<EmailCustomHeader> getCustomHeaders()
      Get the customHeaders property: Custom email headers to be passed.
      Returns:
      the customHeaders value.
    • setCustomHeaders

      public EmailMessage setCustomHeaders(List<EmailCustomHeader> customHeaders)
      Set the customHeaders property: Custom email headers to be passed.
      Parameters:
      customHeaders - the customHeaders value to set.
      Returns:
      the EmailMessage object itself.
    • getSender

      public String getSender()
      Get the sender property: Sender email address from a verified domain.
      Returns:
      the sender value.
    • getContent

      public EmailContent getContent()
      Get the content property: Email content to be sent.
      Returns:
      the content value.
    • getImportance

      public EmailImportance getImportance()
      Get the importance property: The importance type for the email.
      Returns:
      the importance value.
    • setImportance

      public EmailMessage setImportance(EmailImportance importance)
      Set the importance property: The importance type for the email.
      Parameters:
      importance - the importance value to set.
      Returns:
      the EmailMessage object itself.
    • getRecipients

      public EmailRecipients getRecipients()
      Get the recipients property: Recipients for the email.
      Returns:
      the recipients value.
    • setRecipients

      public EmailMessage setRecipients(EmailRecipients recipients)
      Set the recipients property: Recipients for the email.
      Parameters:
      recipients - the recipients value to set.
      Returns:
      the EmailMessage object itself.
    • getAttachments

      public Iterable<EmailAttachment> getAttachments()
      Get the attachments property: list of attachments.
      Returns:
      the attachments value.
    • setAttachments

      public EmailMessage setAttachments(List<EmailAttachment> attachments)
      Set the attachments property: list of attachments.
      Parameters:
      attachments - the attachments value to set.
      Returns:
      the EmailMessage object itself.
    • getReplyTo

      public Iterable<EmailAddress> getReplyTo()
      Get the replyTo property: Email addresses where recipients' replies will be sent to.
      Returns:
      the replyTo value.
    • setReplyTo

      public EmailMessage setReplyTo(Iterable<EmailAddress> replyTo)
      Set the replyTo property: Email addresses where recipients' replies will be sent to.
      Parameters:
      replyTo - the replyTo value to set.
      Returns:
      the EmailMessage object itself.
    • isDisableUserEngagementTracking

      public Boolean isDisableUserEngagementTracking()
      Get the disableUserEngagementTracking property: Indicates whether user engagement tracking should be disabled for this request if the resource-level user engagement tracking setting was already enabled in the control plane.
      Returns:
      the disableUserEngagementTracking value.
    • setDisableUserEngagementTracking

      public EmailMessage setDisableUserEngagementTracking(Boolean disableUserEngagementTracking)
      Set the disableUserEngagementTracking property: Indicates whether user engagement tracking should be disabled for this request if the resource-level user engagement tracking setting was already enabled in the control plane.
      Parameters:
      disableUserEngagementTracking - the disableUserEngagementTracking value to set.
      Returns:
      the EmailMessage object itself.