The address books API, also including the :doc:`addressBooks` and :doc:`contacts` namespaces, first appeared in Thunderbird 64.
The Address Books sample extension uses this API.
Note
The permission addressBooks
is required to use mailingLists
.
Gets all the mailing lists in the address book with id parentId
.
parentId
(string)
Returns a Promise fulfilled with:
- array of :ref:`mailingLists.MailingListNode`
Gets a single mailing list.
id
(string)
Returns a Promise fulfilled with:
Creates a new mailing list in the address book with id parentId
.
parentId
(string)properties
(object)name
(string)- [
description
] (string) - [
nickName
] (string)
Returns a Promise fulfilled with:
- string The ID of the new mailing list.
Edits the properties of a mailing list.
id
(string)properties
(object)name
(string)- [
description
] (string) - [
nickName
] (string)
Removes the mailing list.
id
(string)
Adds a contact to the mailing list with id id
. If the contact and mailing list are in different address books, the contact will also be copied to the list's address book.
id
(string)contactId
(string)
Gets all contacts that are members of the mailing list with id id
.
id
(string)
Returns a Promise fulfilled with:
- array of :ref:`contacts.ContactNode`
Removes a contact from the mailing list with id id
. This does not delete the contact from the address book.
id
(string)contactId
(string)
Fired when a mailing list is created.
Fired when a mailing list is changed.
Fired when a mailing list is deleted.
parentId
(string)id
(string)
Fired when a contact is added to the mailing list.
node
(:ref:`contacts.ContactNode`)
Fired when a contact is removed from the mailing list.
parentId
(string)id
(string)
A node representing a mailing list.
object
description
(string)id
(string) The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the program is restarted.name
(string)nickName
(string)type
(:ref:`addressBooks.NodeType`) Always set tomailingList
.- [
contacts
] (array of :ref:`contacts.ContactNode`) A list of contacts held by this node's address book or mailing list. - [
parentId
] (string) Theid
of the parent object. - [
readOnly
] (boolean) Indicates if the object is read-only. Currently this returns false in all cases, as read-only address books are ignored by the API.