Changes up to Thunderbird 91 ESR
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,
registeredScriptsin 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
sizeproperty 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
messageIdargument. IfmessageIdis provided, the referenced message is opened to compose as a new message. This works for ordinary messages and templates.Using beginForward function with a
forwardInlinetype anddetailsargument 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
composeHtmlproperty 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,plainTextBodyandisPlaintextas 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_borderhas been added.
Thunderbird 87 Beta
commands API
The commands API now supports the internal shortcuts
_execute_compose_actionand_execute_message_display_action.
Thunderbird 88 Beta
compose API
added a
typeproperty to ComposeDetails, to distinguish betweennew,reply,forwardanddraftadded a
fromproperty 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_menucontext to ContextTypeadded a
selectedAccountproperty 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_actionContextTypeadded
message_display_actionandcompose_actionContextTypeintroducing a
fieldIdproperty to OnClickData and OnShowData to to support fields part of the Thunderbird UI (currently supported values arecomposeSubject,composeTo,composeCc,composeBcc,composeReplyToandcomposeNewsgroupTo)
Thunderbird 90 Beta
cloudFile API
added support for the
browser_stylemanifest property to the cloudFile API
compose API
added sendMessage(tabId, [options]) function
added getComposeState(tabId) function
added onComposeStateChanged event
added ComposeState type
added
redirectenum to type property of ComposeDetails
messages API
added
sizeproperty to the MessageHeader
Thunderbird 91.0 ESR
accounts API
list([includeSubFolders]), get(accountId, [includeSubFolders]) and getDefault([includeSubFolders]) now have an optional parameter
includeFoldersto specify if the returned MailAccount objects should populate thefoldersproperty. Defaults totrue
addressbooks API
added
remoteproperty to AddressBookNode
cloudFile API
added the
tabparameter to onFileDeletedadded the
tabparameter to onFileUploadadded the
tabparameter to onFileUploadAbort
compose API
all attachment related functions and events now also require the permission
contacts API
added
remoteproperty 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
totalMessageCountsorunreadMessageCountsadded 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
signatureandsignatureIsPlainTextto MailIdentity
mailingLists API
added
remoteproperty to MailingListNode
mailTabs API
the MailTab object now includes a
viewTypeproperty, supporting the valuesungrouped,groupedByThreadandgroupedBySortTypethe update([tabId], updateProperties) function allows to set the new
viewTypeproperty
messages API
query([queryInfo]) now searches all messages and not only the indexed ones
added support for negative tag search to query([queryInfo])
added
includeSubFoldersto search folders recursivly with query([queryInfo])added onUpdated
added onMoved
added onCopied
added onDeleted
added the permission to guard delete(messageIds, [skipTrash])
tabs API
added
typeproperty to Tab, supportingaddressBook,calendar,calendarEvent,calendarTask,chat,content,mail,messageCompose,messageDisplay,specialandtasksadded
typeas supported property of thequeryInfoparameter of query([queryInfo])
Thunderbird 91.0.2 ESR
browserAction API
backported support for the
tabstoolbarlocation, usable in thedefault_areamanifest key
Thunderbird 91.4.1 ESR
cloudFile API
backported support for the
templateInfoproperty, which is now returned by the onFileUpload event
messages API
backported support to query for a given
headerMessageIdin query([queryInfo])