The messages API first appeared in Thunderbird 66 (see bug 1488176).
- messagesRead "Read your email messages and mark or tag them"
Note
The permission messagesRead
is required to use messages
.
Gets all messages in a folder.
folder
(:ref:`accounts.MailFolder`)
Returns a Promise fulfilled with:
Returns the next chunk of messages in a list. See :doc:`how-to/messageLists` for more information.
messageListId
(string)
Returns a Promise fulfilled with:
Returns a specified message.
messageId
(integer)
Returns a Promise fulfilled with:
Returns a specified message, including all headers and MIME parts.
messageId
(integer)
Returns a Promise fulfilled with:
Marks or unmarks a message as read, starred, or tagged.
messageId
(integer)newProperties
(object)- [
flagged
] (boolean) Marks the message as starred or unstarred. - [
read
] (boolean) Marks the message as read or unread. - [
tags
] (array of string) Sets the tags on the message. For a list of available tags, call the listTags method.
- [
Returns a list of tags that can be set on messages, and their human-friendly name, colour, and sort order.
Returns a Promise fulfilled with:
- array of :ref:`messages.MessageTag`
object
author
(string)bccList
(array of string)ccList
(array of string)date
(date)flagged
(boolean)folder
(:ref:`accounts.MailFolder`)messageId
(integer)read
(boolean)recipients
(array of string)subject
(string)tags
(array of string)
See :doc:`how-to/messageLists` for more information.
object
id
(string)messages
(array of :ref:`messages.MessageHeader`)
Represents an email message "part", which could be the whole message
object
- [
body
] (string) The content of the part - [
contentType
] (string) - [
headers
] (object) An object of part headers, with the header name as key, and an array of header values as value - [
name
] (string) Name of the part, if it is a file - [
partName
] (string) - [
parts
] (array of :ref:`messages.MessagePart`) Any sub-parts of this part - [
size
] (integer)
object
color
(string) Tag colorkey
(string) Distinct tag identifier – use this string when referring to a tagordinal
(string) Custom sort string (usually empty)tag
(string) Human-readable tag name