Changes up to Thunderbird 91 Beta
Thunderbird 81 Beta
messageDisplay API
The getDisplayedMessages([tabId]) function has been added to allow access to details of multiple-selection of email. Previously only a single selection function was available.
The onMessagesDisplayed event has been added.
See the documentation on those functions and events for more information.
Thunderbird 82 Beta
compose API
Attachments can now be specified in the beginNew, beginReply, and beginForward functions.
tabs API
The connect and sendMessage functions now work as they do in Firefox.
messageDisplayScripts API
Content script functions can now operate on a message display “tab” in the same way they do on a content tab in Thunderbird or Firefox. This requires the new
permission.Here are some basic examples. See the MDN documentation for a more in-depth explanation.
// Where tabId is the id of a message display tab: browser.tabs.executeScript(tabId, { code: `document.body.textContent = "Hey look, the script ran!";`, }); browser.tabs.executeScript(tabId, { file: "display.js", }); browser.tabs.insertCSS(tabId, { code: "body { background-color: red; }", }); browser.tabs.insertCSS(tabId, { file: "display.css", }); browser.tabs.removeCSS(tabId, { code: "body { background-color: red; }", }); browser.tabs.removeCSS(tabId, { file: "display.css", });
Scripts can also be registered to run automatically on messages being displayed, using the new messageDisplayScripts API.
Again, this works just like the contentScripts API:
let registeredScripts = await browser.messageDisplayScripts.register({ css: [ // Any number of code or file objects could be listed here. { code: "body { background-color: red; }" }, { file: "display.css" }, ], js: [ // Any number of code or file objects could be listed here. { code: `document.body.textContent = "Hey look, the script ran!";` }, { file: "display.js" }, ], });
Added code will run immediately and CSS will be immediately applied to already-open message display tabs or windows, and any new message display tabs or windows.
The returned value,
registeredScripts
in this example, is an object with which you can unregister the code/CSS:await registeredScripts.unregister();
Note
This functionality does not permanently alter messages, only what the user sees when they are displayed.
Thunderbird 83 Beta
compose API
ComposeAttachment objects now have a
size
property with the size of the attachment in bytes.
contacts API
The onUpdated event now calls listeners with a second argument, containing details of the changes made. For example:
{ "FirstName": { "oldValue": "Daniel", "newValue": "Danielle" }, "DisplayName": { "oldValue": "Daniel Smith", "newValue": "Danielle Smith" } }
Thunderbird 84 Beta
compose API
The beginNew function now has an optional
messageId
argument. IfmessageId
is provided, the referenced message is opened to compose as a new message. This works for ordinary messages and templates.Using beginForward function with a
forwardInline
type anddetails
argument specified has been fixed.
menus API
The standard properties available to onShown are now available for messages being composed, if your extension has the permission.
tabs API
At start-up, tabs.create will now wait for a window to open before attempting to open a tab.
windows API
The openDefaultBrowser(url) function has been added.
browserAction API
The setLabel(details) and getLabel(details) functions have been added. It is now possible to set a label value different from the title (which is used as tooltip text). The label can be set to an empty string to make the action button not have a label at all. If the toolbar is set to text-mode only (no icons), the action button label uses the title as fallback, in case an empty label has been set.
composeAction API
The setLabel(details) and getLabel(details) functions have been added. It is now possible to set a label value different from the title (which is used as tooltip text). The label can be set to an empty string to make the action button not have a label at all. If the toolbar is set to text-mode only (no icons), the action button label uses the title as fallback, in case an empty label has been set.
messageDisplayAction API
The setLabel(details) and getLabel(details) functions have been added. It is now possible to set a label value different from the title (which is used as tooltip text). The label can be set to an empty string to make the action button not have a label at all. If the toolbar is set to text-mode only (no icons), the action button label uses the title as fallback, in case an empty label has been set.
Thunderbird 85 Beta
addressBooks API & contacts API
The addressBooks API and contacts API will now return read-only address books. Add-ons that may update contacts and address books should check the readOnly
flag of AddressBookNode.
accounts API
The
composeHtml
property has been added to the MailIdentity type, to indicate, if the identity uses HTML as the default compose format.The getDefaultIdentity(accountId) function has been added, to get the default identity of a given account. Use getDefault([includeSubFolders]) to get the default account.
compose API
The begin* functions now honor
body
,plainTextBody
andisPlaintext
as compose format selectors, overriding the default compose format of the used/default identity. The accounts API can be used to get the used/default identity and its default compose format.
messages API
query([queryInfo]) supports queries for messages with a given
headerMessageId
Thunderbird 86 Beta
theme API
The theme API was added to Thunderbird (see bug 1684666). It’s more or less the same as the Firefox theme API, but has been extended to better fit the needs of Thunderbird.
The color key
sidebar_highlight_border
has been added.
Thunderbird 87 Beta
commands API
The commands API now supports the internal shortcuts
_execute_compose_action
and_execute_message_display_action
.
Thunderbird 88 Beta
compose API
added a
type
property to ComposeDetails, to distinguish betweennew
,reply
,forward
anddraft
added a
from
property to ComposeDetails, to get/set the actual from address (independent of the used identity)
contacts API
fixed quickSearch([parentId], queryInfo) to not fail on mailing lists
menus API
added a
tools_menu
context to ContextTypeadded a
selectedAccount
property to OnShowData and OnClickData, if the menu was opened on a root folder in the folder panefixed onClicked to keep the user input status so openPopup([options]) can be used
messages API
added listAttachments(messageId) and getAttachmentFile(messageId, partName) methods to work with message attachments
fixed getRaw(messageId, [options]) to work for nntp/news messages
Thunderbird 89 Beta
mailTabs API
added getCurrent() and get(tabId) functions
menus API
fixed
browser_action
ContextTypeadded
message_display_action
andcompose_action
ContextTypeintroducing a
fieldId
property to OnClickData and OnShowData to to support fields part of the Thunderbird UI (currently supported values arecomposeSubject
,composeTo
,composeCc
,composeBcc
,composeReplyTo
andcomposeNewsgroupTo
)
Thunderbird 90 Beta
cloudFile API
added support for the
browser_style
manifest property to the cloudFile API
compose API
added sendMessage(tabId, [options]) function
added getComposeState(tabId) function
added onComposeStateChanged event
added ComposeState type
added
redirect
enum to type property of ComposeDetails
messages API
added
size
property to the MessageHeader
Thunderbird 91 Beta
accounts API
list([includeSubFolders]), get(accountId, [includeSubFolders]) and getDefault([includeSubFolders]) now have an optional parameter
includeFolders
to specify if the returned MailAccount objects should populate thefolders
property. Defaults totrue
addressbooks API
added
remote
property to AddressBookNode
cloudFile API
added the
tab
parameter to onFileDeletedadded the
tab
parameter to onFileUploadadded the
tab
parameter to onFileUploadAbort
compose API
all attachment related functions and events now also require the
permission
contacts API
added
remote
property to ContactNodesecond parameter to quickSearch([parentId], queryInfo) can now be a qeuryInfo object instead of just a string, to define mored detailes query parameters
folders API
delete(folder) now requires the permission
added new function getParentFolders(folder, [includeSubFolders]) to get information about the current hierarchy level and parent folders
added new function getSubFolders(folder, [includeSubFolders]) to get information about subfolders
the create(destination, childName) function can now create folders in the root of an account, by specifying an account instead of a folder as first parameter
added move(source, destination) function
added copy(source, destination) function
added getFolderInfo(folder) function and MailFolderInfo type to obtain additional folder information like
totalMessageCounts
orunreadMessageCounts
added onCreated event
added onRenamed event
added onMoved event
added onCopied event
added onDeleted event
added onFolderInfoChanged event
identities API
added identities API (including create/delete/update functions and onCreated/onDeleted/onUpdated events)
added
signature
andsignatureIsPlainText
to MailIdentity
mailingLists API
added
remote
property to MailingListNode
mailTabs API
the MailTab object now includes a
viewType
property, supporting the valuesungrouped
,groupedByThread
andgroupedBySortType
the update([tabId], updateProperties) function allows to set the new
viewType
property
messages API
query([queryInfo]) now searches all messages and not only the indexed ones
added support for negative tag search to query([queryInfo])
added
includeSubFolders
to search folders recursivly with query([queryInfo])added onUpdated
added onMoved
added onCopied
added onDeleted
added the delete(messageIds, [skipTrash])
permission to guard
tabs API
added
type
property to Tab, supportingaddressBook
,calendar
,calendarEvent
,calendarTask
,chat
,content
,mail
,messageCompose
,messageDisplay
,special
andtasks
added
type
as supported property of thequeryInfo
parameter of query([queryInfo])