Represents an email message with various properties such as sender, recipients, subject, content, and attachments.
You wouldn't typically create this type directly. Instead, you probably want to use the createMessage function, which provides a more convenient API for creating messages.
recipients: readonly Address[]
The email addresses of the recipient of the message.
ccRecipients: readonly Address[]
The email addresses of the carbon copy (CC) recipients of the message.
bccRecipients: readonly Address[]
The email addresses of the blind carbon copy (BCC) recipients of the message.
replyRecipients: readonly Address[]
The email addresses of the reply-to recipients of the message.
attachments: readonly Attachment[]
The attachments included in the email message. These are files that are sent along with the email, such as documents, images, or other media files. Each attachment is represented by an Attachment object, which contains information about the attachment such as its filename, content type, and content ID.
The subject of the email message. This is typically a brief summary of the content of the email, and is used to help the recipient identify the purpose of the message.
content: MessageContent
The content of the email message, which can be either HTML or plain text. This property is represented by the MessageContent type, which includes both HTML and plain text content. The HTML content is typically used for rich formatting and layout, while the plain text content is used for simple text emails or for compatibility with email clients that do not support HTML.
The priority of the email message, which indicates its importance
relative to other messages. The priority can be one of three
levels: "high", "normal", or "low". This is represented by
the Priority type, which is a string literal type that
allows only these three values.
headers: ImmutableHeaders
The headers of the email message. This is represented by
the ImmutableHeaders type, which is a supertype of
the standard Headers class. The ImmutableHeaders type
includes only the methods for reading the headers, such as get, keys,
has, and entries, but does not include methods for modifying
the headers, such as append, delete, or set.