This page is badly broken (https://bugzilla.mozilla.org/show_bug.cgi?id=868872), use http://mdn.beonex.com/en/Extensions/Thunderbird/HowTos.html in the meanwhile.
Please add questions or answers to this page so that other people can benefit from your work. Also, you will see that there are many topics for which there is a question, but no answer. Please help by adding an answer! (Adding another question helps too!)
To get started creating the most basic extension framework, please see Building a Thunderbird Extension.
This page is organized into two parts: common extension techniques and Thunderbird-specific APIs. The former discusses general methods to hook into Thunderbird, while the latter is more focused on how to do interesting things once Thunderbird has started running your code.
See also "An overview of Thunderbird components". Many of the components described on that page have links to related examples.
Common Extension Techniques
- Adding a Toolbar Button
- Adding an Option to the Context Menu TODO
- Opening a New Tab
- Accessing StringBundle from an Overlay
- Access Thunderbird Window Areas
- Access Window
- Access Message in Compose Window Editor
- Create Custom Column
- Detect Opening Folder
- Filter Incoming Mail NEW!
- Get Thunderbird version
- Use SQLite
Thunderbird-specific APIs for Extensions
Each of the pages listed in this section contains a number of related topics. For example, the "Compose New Message" page contains sections that describe how to open a new message window, modify a message body, etc.
Folders and message lists
- Getting the Current nsIMsgFolder
- Getting the Currently-Selected Message
- Changing the Current Message Selection
- Listing Messages in a Folder
- Listing Subfolders TODO
- Perform Operation on Folder TODO
- Check for New Mail TODO
- Watch for New Mail TODO
- Check if a Message is a Feed Item TODO
- Move Selected Message TODO
- Copy Selected Message TODO
View message
- Get Message Header by URI/URL
- List Attachments TODO
- Read Attachment TODO
- Save Attachment TODO
- Access Message TODO
- Get Message Body by Header TODO
- Get MIME Headers for any message
- Search Messages TODO
- Display a message yourself using <iframe>s TODO
Compose new messages
- Open New Message Window
- Modify Recipient List TODO
- Modify Header
- Add Header
- Modify Message Body
- Intercept Outgoing Message
- Get Access to the Compose Window before the Editing is Started
- Automatic message sending
- Creating a message for sending later (store it in the Outbox folder)
Reply to message
- Modify Quoted Message (before normal composition) TODO
- Reply to a given message, reply to all, forward it, reply to list, and all variants
Access address book
- Get all address books
- Get one address book
- Search for a particular contact property (name, email)
- Search for multiple contacts
- Add / edit / Delete contacts
- Add and use custom properties
- Add / edit / delete mailing lists
- Display properties dialogs to the user
- Set up custom address book
- Set up auto-complete to use the address book
Activity Manager
- Show a user-defined activity in the Activity Manager window NEW!
- Show a user-defined activity with cancel capability (JavaScript) in the Activity Manager window NEW!
- Show a user-defined activity with undo capability (C++) in the Activity Manager window NEW!
- Add an activity with a custom context type in the Activity Manager window NEW!
- Add a fully customized activity in the Activity Manager window NEW!