You are currently viewing a snapshot of taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to, please file a bug.

Mozilla Thunderbird Extensions

Extensions are a great way to extend the functionality of Mozilla Thunderbird. You can find available Thunderbird extensions at:

Many contributors, post to the MozillaZine Forums or send me e-mail directly saying things like "I love Thunderbird but I really want it to do *insert random feature* before I'll switch to it". Extensions are a great way for folks to add these kinds of features that can make the product better for a subset of users. One great thing about extensions is that you don't need to be expert about how the entire product is designed in order to write an overlay for a small feature. Writing a Thunderbird extension is a great way to make a contribution to the project and to get your feet wet with the code base!

This document is split into two parts:

  • Ideas for extensions
  • How to write a Thunderbird extension (including an example extension).

Extension Ideas

If you want to write an extension and are looking for ideas, here are several that have been submitted to me via the forums or over email that would make excellent extensions to Mozilla Thunderbird. I'll try to update this document if I think someone is working on one of these ideas.

  • An extension for adding back the Mozilla Suite's "get all messages" functionality to the mail 3-pane toolbar. This extension is already in the works.
  • Extension for adding Mozilla Palm Synch support. Should be as simple as building the existing palm sync extension for Mozilla mail and bundling it into an XPI.
  • Extension for adding a quick reply box to the mail 3-pane. See my comments on how to that, here.
  • An extension for PGP/MIME support (a.k.a. Enigmail for Thunderbird).
  • Add back the Mozilla Mail menu for View / Messages / Simple / Plain / HTML. This should be pretty simple to resurrect. Look at the XUL and JS from Mozilla Mail that are used to implement this menu item.
  • An extension for adding Yahoo mail support or maybe hotmail? This is a commonly requested feature. I've started a thread discussing how you should implement this, see Adding Yahoo Mail support.
  • An extension for adding minimize to system tray support for Windows (may not be possible to do this as an extension)
  • An extension that allows the user to configure auto quote colors.
  • An extension that turns off SMIME support in Thunderbird by default and turns it into an extension.
  • Turn off LDAP support by default and turn it into an extension.
  • An extension that modifies the mail compose window, allowing you to set the outgoing priority of a message directly from the window instead of having to dig down into the compose menu items (this should be an easy one).
  • An extension for integrating with various instant-messaging clients.
  • An extension which adds about:config functionality to Thunderbird. Maybe it adds a menu item under tools that brings up a window running about:config. This allows a user to edit preferences without having to manually edit prefs.js
  • Extension for adding vCards as signatures
  • Extension for adding pre-trained adaptive filters (maybe a light, medium and heavy training.dat files) to reduce the time users need to spend training their junk filters.
  • Extension for adding ROT13 support.
  • How about an extension that allows you to view and even better, modify your adaptive junk mail filters (needs to read and display the training.dat file)?
  • An extension to attach random signature quotes to outgoing messages. (Apparently there is already a Mozilla extension to do this (TagZilla), it may need to be tweaked for Thunderbird.)

For more ideas, read the MozillaZine thread: Ideas for Thunderbird Extensions.

How to Write an Extension

For starters, read the tutorial. Next, take a look at the Offline Extension, which serves as a model for how to write an extension. I'm not going to repeat the details of the Mozilla tutorial. You should also be familiar with our XUL overlays work before beginning. Most extensions involve creating new overlays to get dropped into Thunderbird chrome. I will point out a few things in the offline extension:

  1. Write your extension using XUL overlays. Chrome URLs should have their own name space (i.e. chrome://messenger-offline/content/msgOfflineOverlay.xul instead of chrome://messenger/content/msgOfflineOverlay.xul).
  2. Your locale and content directories will each need a contents.rdf file to describe the overlays and the new locale packages to be installed. Use the versions in offline.jar as an example.
  3. Many extensions will want to have a dialog where the user can configure the settings for the extension. You can do this by specifying a "settingsURL" field in content/contents.rdf for your extension. When the user selects the Settings dialog from the extension panel, Thunderbird will attempt to load the chrome for the settingsURL. Note how offline does this to allow the user to configure their offline settings. Think settings dialog first before thinking about overlaying into the existing preferences hierarchy. Most of the time a settings dialog will make more sense.
  4. I hope to add some information about how to write code to uninstall your extension in the very near future.
  5. Create a JAR file that contains your new overlays/chrome/images/locale information (i.e. offline.jar)
  6. Zip up install.js and your jar file into a new zip file with a .xpi extension.
  7. You just spent this time building a great extension to Thunderbird. Write up an instruction sheet for users similar to the Offline Extension User Guide. Include screen shots and any other information that will help make it easier for a user to understand how to use this extension. Fill in the authorURL field in content/contents.rdf and make sure it points to your page!
  8. That's it! Get it published up on the help site.