This is an archived page. It's not actively maintained.

Thunderbird extensions


Building a Thunderbird extension
Step-by-step explanation on how to build an extension for Thunderbird.

The following documentation provides help for creating extensions for the Thunderbird email client. There are similarities with Firefox extensions, but there are also differences that may confound the starting Thunderbird developer. This documention series focuses on Thunderbird.

Need personalized help? See Community / Communications.

Warning: This content is for older versions of Thunderbird. Much of it may no longer be relevant. See for newer information.

Getting started with Thunderbird

A brave, young developer wants to develop an add-on for Thunderbird. These links to help through this journey.

  • Start by reading the tutorial and learn how to build a Thunderbird extension.  Also see Thunderbird 57-60 add-ons guide for changes introduced in Thunderbird 60.
  • Read about the main windows to learn about « thread pane », « preview pane », and « folder pane ».
  • Play with a demo add-on that exercises some more advanced Thunderbird-specific features
  • Want to do even more? Don't reinvent the wheel: steal from the thunderbird-stdlib project (doc here). Functions for dealing with messages (delete, archive, change tags, etc.) are included. MailUtils.js.
  • Haven't found what you need? Read the Thunderbird how-tos; they contain many recipes for things extensions want to do.
  • Still stuck?  Ask in a community communication channel on the right.
  • Feeling really brave? Read the source using a fancy interface; you can often find tests that demonstrate what you're trying to achieve.

The Gloda database

Thunderbird has a subsystem called Gloda. Gloda stands for « Global Database », and creates Thunderbird-wide relations between objects. Gloda provides concepts such as Conversations, Messages, Identities, Contacts. All these concepts are related : a Conversation contains Messages which are linked to Identities (from field, to field) which are themselves part of a Contact: indeed, a contact has multiple identities.

Typical use cases for Gloda: find all messages whose subject matches [search term], find all messages from [person], find all messages in the same thread as [a given message], find all messages involving [person], etc. etc.

Gloda is extremely powerful and is used heavily by add-ons such as Thunderbird Conversations. Learn more about Gloda:

Some links may be out of date, but they still provide valuable information on the codebase.

Community / Communications

Thunderbird specific :

More general :

XUL, JavaScript, XPCOM, Themes, Developing Mozilla