Class: OutboundMessage

OutboundMessage

new OutboundMessage(jmap, optsopt)

This class represents a JMAP Message but for client-to-server purpose.
When creating a new OutboundMessage instance, the following requirements must be met:

  • The id, blobId, threadId, size, preview, hasAttachment and attachedMessages must be not defined (it is set by the server upon creation)
Parameters:
Name Type Attributes Description
jmap Client

The Client instance that created this OutboundMessage.

opts Object <optional>

The optional properties of this OutboundMessage.

Properties
Name Type Attributes Default Description
mailboxIds Array.<String> <optional>
[]

The array of Mailbox identifiers which will contain this OutboundMessage.

inReplyToMessageId String <optional>
null

The id of the Message this OutboundMessage is a reply to.

isUnread Boolean <optional>
null

Has the message not yet been read? This maps to the opposite of the \Seen flag in IMAP.

isFlagged Boolean <optional>
null

Is the message flagged? This maps to the \Flagged flag in IMAP.

isAnswered Boolean <optional>
null

Has the message been replied to? This maps to the \Answered flag in IMAP.

isDraft Boolean <optional>
null

Is the message a draft? This maps to the \Draft flag in IMAP.

headers Object <optional>

A hash of header name to header value for all headers in the message. For headers that occur multiple times, the values are concatenated with a single new line (\n) character in between each one.

from String <optional>
null

Overrides the value used as From: in the headers.

to Array.<String> <optional>
null

Overrides the value used as To: in the headers.

cc Array.<String> <optional>
null

Overrides the value used as CC: in the headers.

bcc Array.<String> <optional>
null

Overrides the value used as BCC: in the headers.

replyTo String <optional>
null

Overrides the value used as Reply-To: in the headers.

subject String <optional>
null

The subject of this OutboundMessage.

textBody String <optional>
null

The plain text body part.

htmlBody String <optional>
null

The HTML body part.

attachments Array.<Attachment> <optional>
[]

An array of Attachment objects detailing all the attachments to the message. Attachments must first be uploaded using the standard upload mechanism.

Source:
See:

Extends

Methods

toJSONObject()

Creates a JSON representation from this model.

Source:
Returns:

JSON object with only owned properties and non default values.