messages¶
The messages API first appeared in Thunderbird 66.
Note
When the term messageId
is used in these documents, it doesn’t refer to the Message-ID
email header. It is an internal tracking number that does not remain after a restart. Nor does
it follow an email that has been moved to a different folder.
Warning
Some functions in this API potentially return a lot of messages. Be careful what you wish for! See Working with Message Lists for more information.
Permissions¶
Functions¶
list(folder)¶
continueList(messageListId)¶
Returns the next chunk of messages in a list. See Working with Message Lists for more information.
messageListId
get(messageId)¶
Returns a specified message.
messageId
getFull(messageId)¶
Returns a specified message, including all headers and MIME parts.
messageId
getRaw(messageId)¶
Returns the unmodified source of a message.
messageId
query(queryInfo)¶
Gets all messages that have the specified properties, or all messages if no properties are specified.
queryInfo
author
]body
]flagged
]fromMe
]fullText
]recipients
]subject
]toMe
]unread
]update(messageId, newProperties)¶
Marks or unmarks a message as read, flagged, or tagged.
messageId
newProperties
flagged
]junk
]read
]tags
]move(messageIds, destination)¶
Moves messages to a specified folder.
messageIds
copy(messageIds, destination)¶
Copies messages to a specified folder.
messageIds
delete(messageIds, [skipTrash])¶
Deletes messages, or moves them to the trash folder.
messageIds
skipTrash
]archive(messageIds)¶
Archives messages using the current settings.
messageIds
listTags()¶
Returns a list of tags that can be set on messages, and their human-friendly name, colour, and sort order.
Types¶
MessageHeader¶
author
bccList
ccList
date
flagged
id
read
recipients
subject
tags
MessageList¶
See Working with Message Lists for more information.
MessagePart¶
Represents an email message “part”, which could be the whole message
body
]contentType
]headers
]name
]partName
]size
]MessageTag¶
color
key
ordinal
tag