• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
Add-ons
  1. MDN
  2. Mozilla
  3. Add-ons
  4. Thunderbird extensions

Thunderbird extensions

In This Article
  1. Documentation
    1. Getting started with Thunderbird
    2. The Gloda database
    3. More Thunderbird-specific links
    4. General links
  2. Community
  3. Tools
  4. Related Topics
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:

  • an overview of Gloda
  • learn how to create your first message query and read the gloda examples
  • learn about the Gloda internals: Gloda debugging, Gloda indexing

More Thunderbird-specific links

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

  • An overview of Thunderbird components
  • Developer reference docs:
    • Folder classes
    • DB views (message list)
    • Message summary database
    • MailNews protocols
    • MailNews filters
    • Error reporting tools
    • STEEL library (obsolete as of Thunderbird 52, use https://github.com/protz/thunderbird-stdlib)
    • Developing new account types NEW!
  • Useful newsgroup discussions (watch out, anything that's too old should be regarded suspiciously; there's been significant API rewrite over the past years, and most of these techniques are considerably easier now) 
  • Thunderbird API docs (mostly a collection of out-of-date pages, relevance is rather dubious) 
  • Thunderbird developer release notes - changes in the recent Thunderbird updates affecting add-on developers. Thunderbird 5 for developers has important information on MsgHdrToMimeMessage which is a central piece of code.

General links

  • Finding the code for a feature
  • Mozillazine articles on Thunderbird
  • All pages tagged with Thunderbird
  • All pages tagged with MailNews

Community

  • See the list of all Thunderbird communication channels first
  • Among these are:

  • Mailing list
  • Google Group
  • RSS feed

  • #extdev IRC channel / #maildev IRC channel
  • MozillaZine forum
  • mozdev project owners
  • Other community links...

Tools

  • DOM Inspector edit the live DOM (Firefox and Thunderbird)
  • Workspace for Thunderbird, allows running code snippets in Thunderbird and inspecting variable structure and content
  • Venkman, a JavaScript debugger (Firefox, Thunderbird)
  • Extension Developer's Extension a suite of development tools
  • Chrome List view files in chrome:// (Firefox, Thunderbird)
  • Mozmill test tool and framework
  • XPCOMViewer an XPCOM inspector (Firefox and Thunderbird)

... more tools ...

View All...

Related Topics

XUL, JavaScript, XPCOM, Themes, Developing Mozilla

Categories

Document Tags and Contributors

Tags: 
  • Add-ons
  • Extensions
  • thunderbird
 Contributors to this page: Croydon, Lugrim, wbamberg, maybe, wsha, marty, openjck, lmorchard, JohnKarahalis, mozjonathan, Aryx, Lanoxx, jenzed, Rkentjames, Sevenspade, Nickolay, jllogan, Standard8, Clarkbw, Brettz9, Mgjbot, Kohei, Felix.Schwarz, Gcomeaux, Nachmore
 Last updated by: Croydon, Feb 7, 2017, 3:53:30 PM
See also
  1. WebExtensions
  2. Getting started
    1. What are WebExtensions?
    2. Your first WebExtension
    3. Your second WebExtension
    4. Anatomy of a WebExtension
    5. Example WebExtensions
  3. How to
    1. Intercept HTTP requests
    2. Modify a web page
    3. Add a button to the toolbar
    4. Implement a settings page
  4. Concepts
    1. Using the JavaScript APIs
    2. User interface components
    3. Content scripts
    4. Match patterns
    5. Internationalization
    6. Content Security Policy
    7. Native messaging
  5. Porting
    1. Porting a Google Chrome extension
    2. Porting a legacy Firefox add-on
    3. Embedded WebExtensions
    4. Comparison with the Add-on SDK
    5. Comparison with XUL/XPCOM extensions
    6. Chrome incompatibilities
  6. Firefox workflow
    1. Temporary Installation in Firefox
    2. Debugging
    3. Getting started with web-ext
    4. web-ext command reference
    5. WebExtensions and the Add-on ID
    6. Publishing your WebExtension
  7. JavaScript APIs
    1. Browser support for JavaScript APIs
    2. alarms
    3. bookmarks
    4. browserAction
    5. commands
    6. contextMenus
    7. cookies
    8. downloads
    9. events
    10. extension
    11. extensionTypes
    12. history
    13. i18n
    14. identity
    15. idle
    16. management
    17. notifications
    18. pageAction
    19. runtime
    20. sessions
    21. storage
    22. tabs
    23. topSites
    24. webNavigation
    25. webRequest
    26. windows
  8. Manifest keys
    1. applications
    2. author
    3. background
    4. browser_action
    5. commands
    6. content_scripts
    7. content_security_policy
    8. default_locale
    9. description
    10. developer
    11. homepage_url
    12. icons
    13. manifest_version
    14. name
    15. options_ui
    16. page_action
    17. permissions
    18. short_name
    19. version
    20. web_accessible_resources
  9. Add-on SDK
  10. Getting started
    1. Installation
    2. Getting started
    3. Troubleshooting
  11. High-Level APIs
    1. addon-page
    2. base64
    3. clipboard
    4. context-menu
    5. hotkeys
    6. indexed-db
    7. l10n
    8. notifications
    9. page-mod
    10. page-worker
    11. panel
    12. passwords
    13. private-browsing
    14. querystring
    15. request
    16. selection
    17. self
    18. simple-prefs
    19. simple-storage
    20. system
    21. tabs
    22. timers
    23. ui
    24. url
    25. webextension
    26. widget
    27. windows
  12. Low-Level APIs
    1. /loader
    2. chrome
    3. console/plain-text
    4. console/traceback
    5. content/content
    6. content/loader
    7. content/mod
    8. content/symbiont
    9. content/worker
    10. core/heritage
    11. core/namespace
    12. core/promise
    13. dev/panel
    14. event/core
    15. event/target
    16. frame/hidden-frame
    17. frame/utils
    18. fs/path
    19. io/byte-streams
    20. io/file
    21. io/text-streams
    22. lang/functional
    23. lang/type
    24. loader/cuddlefish
    25. loader/sandbox
    26. net/url
    27. net/xhr
    28. places/bookmarks
    29. places/favicon
    30. places/history
    31. platform/xpcom
    32. preferences/event-target
    33. preferences/service
    34. remote/child
    35. remote/parent
    36. stylesheet/style
    37. stylesheet/utils
    38. system/child_process
    39. system/environment
    40. system/events
    41. system/runtime
    42. system/unload
    43. system/xul-app
    44. tabs/utils
    45. test/assert
    46. test/harness
    47. test/httpd
    48. test/runner
    49. test/utils
    50. ui/button/action
    51. ui/button/toggle
    52. ui/frame
    53. ui/id
    54. ui/sidebar
    55. ui/toolbar
    56. util/array
    57. util/collection
    58. util/deprecate
    59. util/list
    60. util/match-pattern
    61. util/object
    62. util/uuid
    63. window/utils
  13. Firefox for Android
  14. Getting started
    1. Walkthrough
    2. Debugging
    3. Code snippets
  15. APIs
    1. Accounts.jsm
    2. BrowserApp
    3. HelperApps.jsm
    4. Home.jsm
    5. HomeProvider.jsm
    6. JavaAddonManager.jsm
    7. NativeWindow
    8. Notifications.jsm
    9. PageActions.jsm
    10. Prompt.jsm
    11. RuntimePermissions.jsm
    12. Snackbars.jsm
    13. Sound.jsm
    14. Tab
  16. Legacy
  17. Restartless extensions
    1. Overview
  18. Overlay extensions
    1. Overview
  19. Themes
  20. Lightweight themes
    1. Overview
  21. Complete themes
    1. Overview
  22. Publishing add-ons
  23. Guides
    1. Signing and distribution overview
    2. Submit an add-on
    3. Review policies
    4. Developer agreement
    5. Featured add-ons
    6. Contact addons.mozilla.org
  24. Community and support
  25. Channels
    1. Add-ons blog
    2. Add-on forums
    3. Stack Overflow
    4. Development newsgroup
    5. IRC Channel