Class EmailMessage
java.lang.Object
com.azure.communication.email.models.EmailMessage
Message payload for sending an email.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the attachments property: List of attachments.Get the bccRecipients property: Email BCC recipients.Get the bodyHtml property: Html version of the email message.Get the bodyPlainText property: Plain text version of the email message.Get the ccRecipients property: Email CC recipients.Get the headers property: Custom email headers to be passed.Get the replyTo property: Email addresses where recipients' replies will be sent to.Get the senderAddress property: Sender email address from a verified domain.Get the subject property: Subject of the email message.Get the toRecipients property: Email To recipients.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.setAttachments(EmailAttachment... attachments) Set the attachments property: List of attachments.setAttachments(List<EmailAttachment> attachments) Set the attachments property: List of attachments.setBccRecipients(EmailAddress... bccRecipients) Set the bccRecipients property: Email BCC recipients.setBccRecipients(String... bccRecipientAddresses) Set the bccRecipients property: Email BCC recipients.setBccRecipients(List<EmailAddress> bccRecipients) Set the bccRecipients property: Email BCC recipients.setBodyHtml(String bodyHtml) Set the bodyHtml property: Html version of the email message.setBodyPlainText(String bodyPlainText) Set the bodyPlainText property: Plain text version of the email message.setCcRecipients(EmailAddress... ccRecipients) Set the ccRecipients property: Email CC recipients.setCcRecipients(String... ccRecipientAddresses) Set the ccRecipients property: Email CC recipients.setCcRecipients(List<EmailAddress> ccRecipients) Set the ccRecipients property: Email CC recipients.setHeaders(Map<String, String> headers) Set the headers property: Custom email headers to be passed.setReplyTo(EmailAddress... replyTo) Set the replyTo property: Email addresses where recipients' replies will be sent to.setReplyTo(List<EmailAddress> replyTo) Set the replyTo property: Email addresses where recipients' replies will be sent to.setSenderAddress(String senderAddress) Set the senderAddress property: Sender email address from a verified domain.setSubject(String subject) Set the subject property: Subject of the email message.setToRecipients(EmailAddress... toRecipients) Set the toRecipients property: Email To recipients.setToRecipients(String... toRecipientAddresses) Set the toRecipients property: Email To recipients.setToRecipients(List<EmailAddress> toRecipients) Set the toRecipients property: Email To recipients.setUserEngagementTrackingDisabled(Boolean userEngagementTrackingDisabled) Set the userEngagementTrackingDisabled 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.
-
Constructor Details
-
EmailMessage
public EmailMessage()
-
-
Method Details
-
getHeaders
Get the headers property: Custom email headers to be passed.- Returns:
- the headers value.
-
setHeaders
Set the headers property: Custom email headers to be passed.- Parameters:
headers- the headers value to set.- Returns:
- the EmailMessage object itself.
-
getSenderAddress
Get the senderAddress property: Sender email address from a verified domain.- Returns:
- the senderAddress value.
-
setSenderAddress
Set the senderAddress property: Sender email address from a verified domain.- Parameters:
senderAddress- the senderAddress value to set.- Returns:
- the EmailMessage object itself.
-
getSubject
Get the subject property: Subject of the email message.- Returns:
- the subject value.
-
setSubject
Set the subject property: Subject of the email message.- Parameters:
subject- the subject value to set.- Returns:
- the EmailMessage object itself.
-
getBodyPlainText
Get the bodyPlainText property: Plain text version of the email message.- Returns:
- the bodyPlainText value.
-
setBodyPlainText
Set the bodyPlainText property: Plain text version of the email message.- Parameters:
bodyPlainText- the bodyPlainText value to set.- Returns:
- the EmailMessage object itself.
-
getBodyHtml
Get the bodyHtml property: Html version of the email message.- Returns:
- the html value.
-
setBodyHtml
Set the bodyHtml property: Html version of the email message.- Parameters:
bodyHtml- the html value to set.- Returns:
- the EmailContent object itself.
-
getToRecipients
Get the toRecipients property: Email To recipients.- Returns:
- the toRecipients value.
-
setToRecipients
Set the toRecipients property: Email To recipients.- Parameters:
toRecipients- the toRecipients value to set.- Returns:
- the EmailContent object itself.
-
setToRecipients
Set the toRecipients property: Email To recipients.- Parameters:
toRecipients- the toRecipients value to set.- Returns:
- the EmailContent object itself.
-
setToRecipients
Set the toRecipients property: Email To recipients.- Parameters:
toRecipientAddresses- the addresses of the toRecipients to set.- Returns:
- the EmailContent object itself.
-
getCcRecipients
Get the ccRecipients property: Email CC recipients.- Returns:
- the cc value.
-
setCcRecipients
Set the ccRecipients property: Email CC recipients.- Parameters:
ccRecipients- the cc value to set.- Returns:
- the EmailMessage object itself.
-
setCcRecipients
Set the ccRecipients property: Email CC recipients.- Parameters:
ccRecipients- the cc value to set.- Returns:
- the EmailMessage object itself.
-
setCcRecipients
Set the ccRecipients property: Email CC recipients.- Parameters:
ccRecipientAddresses- the addresses of the ccRecipients to set.- Returns:
- the EmailContent object itself.
-
getBccRecipients
Get the bccRecipients property: Email BCC recipients.- Returns:
- the bCC value.
-
setBccRecipients
Set the bccRecipients property: Email BCC recipients.- Parameters:
bccRecipients- the bccRecipients value to set.- Returns:
- the EmailRecipients object itself.
-
setBccRecipients
Set the bccRecipients property: Email BCC recipients.- Parameters:
bccRecipients- the bccRecipients value to set.- Returns:
- the EmailRecipients object itself.
-
setBccRecipients
Set the bccRecipients property: Email BCC recipients.- Parameters:
bccRecipientAddresses- the addresses of the bccRecipients to set.- Returns:
- the EmailContent object itself.
-
getAttachments
Get the attachments property: List of attachments. Please note that we limit the total size of an email request (which includes attachments) to 10MB.- Returns:
- the attachments value.
-
setAttachments
Set the attachments property: List of attachments. Please note that we limit the total size of an email request (which includes attachments) to 10MB.- Parameters:
attachments- the attachments value to set.- Returns:
- the EmailMessage object itself.
-
setAttachments
Set the attachments property: List of attachments. Please note that we limit the total size of an email request (which includes attachments) to 10MB.- Parameters:
attachments- the attachments value to set.- Returns:
- the EmailMessage object itself.
-
getReplyTo
Get the replyTo property: Email addresses where recipients' replies will be sent to.- Returns:
- the replyTo value.
-
setReplyTo
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.
-
setReplyTo
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.
-
isUserEngagementTrackingDisabled
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 userEngagementTrackingDisabled value.
-
setUserEngagementTrackingDisabled
Set the userEngagementTrackingDisabled 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:
userEngagementTrackingDisabled- the userEngagementTrackingDisabled value to set.- Returns:
- the EmailMessage object itself.
-