Email

Email

Members

bcc :Array.<Address>

Type:

cc :Array.<Address>

Type:

conversationId :string

The conversation that this email belongs to.
Type:
  • string

folder :Folder

Type:

from :Address

Type:

headers :Object

Type:
  • Object

id :string

The unique identifier of the conversation.
Type:
  • string

isStarred :boolean

Type:
  • boolean

labels :Array.<Label>

Type:

subject :string

Type:
  • string

time :Date

Type:
  • Date

to :Array.<Address>

Type:

Methods

(async) addLabel(label) → {Boolean}

Tag the email with a label.
Parameters:
Name Type Description
label Label | string Label or a string of the label name.
Returns:
true
Type
Boolean

(async) delete() → {Boolean}

Permanently deletes the email. It will be gone forever! It will NOT be in the trash!
Returns:
true
Type
Boolean

(async) getBody()

Returns the body of the email.
Returns:
string

(async) getConversation() → {Conversation}

Returns the conversation that the email belongs to.
Returns:
Type
Conversation

(async) move(folder) → {Boolean}

Move the email to a new folder.
Parameters:
Name Type Description
folder Folder
Returns:
true
Type
Boolean

(async) removeLabel(label) → {Boolean}

Untag the email.
Parameters:
Name Type Description
label Label | string Label or a string of the label name.
Returns:
true
Type
Boolean

(async) star() → {Boolean}

Star (favorite) the email.
Returns:
true
Type
Boolean

(async) unstar() → {Boolean}

Unstar (unfavorite) the email.
Returns:
true
Type
Boolean