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 Mozilla's Thunderbird email client. Although there are many similarities with Firefox extensions there are also some differences that may confound the starting developer.

Please help! You can add a how-to (a question or an answer or a code snippet), summarize and link to a relevant newsgroup discussion, or create a tutorial. Need help? Contact jenzed.

Documentation

Getting started with Thunderbird

A brave, young developer wants to develop an add-on for Thunderbird. Here's a few links to help them through this journey.

  • Start by reading the tutorial and learn how to build a Thunderbird extension (Outdated, still talks about overlays and the add-on builder is no longer available but the tutorial has not been updated.)
  • Read about the main windows so that you know what one means when they say « thread pane », « preview pane », and « folder pane ».
  • Want to do some real stuff? See how to inspect a message (demo add-on included!)
  • Play with our other demo add-on that exercises some more advanced Thunderbird-specific features
  • Want to do even more stuff? Don't reinvent the wheel: steal functions from the thunderbird-stdlib project (doc here). Functions for dealing with messages (delete them, archive them, change their tags, etc.) are included.
  • Haven't found what you're looking for? Read the Thunderbird how-tos; they contain a lot of recipes for things extensions want to do.
  • Still haven't managed to do what you wanted? See the list of all Thunderbird communication channels so that you know where to ask when you get stuck :-).
  • Feeling really brave? Read the source using a fancy interface; you can often find tests that demonstrate how to do 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 together: 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 of these links may be wildly out of date, but they still provide valuable information on the codebase.

Community

Tools

... more tools ...

View All...

XUL, JavaScript, XPCOM, Themes, Developing Mozilla

Categories

Document Tags and Contributors

 Last updated by: Croydon,