Mail Merges in Thunderbird

I send a lot of e-mail, and I often have to send the same message to lots of people. I really hate it when people put everyone in the To field (so everyone gets your e-mail address), and I’m also not a fan of putting everyone in the Bcc field either (as that can trigger spam filters). However, who has the time to copy and paste a message 50 times? Certainly not me, so I started looking for a better solution.

I asked around, and my fellow Musketeer, Eli White, suggested that I take a look at an add-on for Thunderbird called Mail Merge by Alexander Bergmann. I did, and I love it. It allows you to create a normal e-mail in Thunderbird and then send individual copies of it to a list of people in your address book or in a CSV file. You can even do merge fields in the e-mail to customize things.


To install it, open Thunderbird, go into the “Tools” menu, and click on “Add-ons”. In the upper right-hand corner, type “Mail Merge” in the search box and hit enter (or click the magnifying glass). There will be several search results. You want the one called “Mail Merge”. It will have a version number after it. As of right now, it is at version 3.5.0, but the version number may be different depending on what they have released since I wrote this.

Click the “Install” button on the right side of the screen, and once it is done installing, it will tell you that Mail Merge will be installed after you restart Thunderbird. If you are ready to completely close Thunderbird, go ahead and click Restart Now. If not, finish any e-mail you are working on, save your work, and then close and reopen Thunderbird. Once you have restarted Thunderbird, the add-on will be installed.

Using the Add-on

To use the add-on, just create an e-mail just like you normally do. If you are using a list in your address book, put that list into the To field, just like you would if you were going to send the message with everyone in the To field. When you are ready to send, instead of clicking Send, you can either click the little arrow next to the Send button or click on File, and then choose “Mail Merge” from the drop-down.

This will open up the Mail Merge window where you can choose the Source (where the recipient information is coming from. If you choose CSV, a new section will expand where you can choose the location of the CSV file, the field delimiter, etc. The “Deliver Mode” gives you the following options:

  • Send Now – Creates and sends the messages immediately
  • Send Later – Creates the messages and saves them in your Outbox so you can choose when to send them at a later time
  • Save As Draft – Creates the messages and saves them in your Drafts mailbox so you can edit the messages and then send them at a later time

After making your choice, you can choose the “Format” of the message – HTML, Plain Text, or Both – and then click “OK”. A status dialog box will open and show the progress of the message. It will automatically close when the process is complete. If you chose to send the messages immediately, they will appear in your Sent mailbox (provided that you have Thunderbird set to save copies of Sent messages) or in your Drafts or Outbox mailbox if you chose one of the other sending options.

Taking Recipients from a CSV File

If you are using a CSV file for the recipients, make sure the first row has field names in it. Then, use those field names enclosed in double curly brakcets to pull in the data in your message. For example, in the To field, you could put:
{{first}} {{last}} <{{email}}>

You can also use the fields in the subject or body of the message, like this:
Dear {{first}}, How are you?

Taking Recipients from Your Address Book

If you are using the Address Book for recipients, you can use many of the fields stored in the address book in the merge. You can view a complete list of the Address Book fields that are supported on the Mail Merge add-on page:


You can even do conditional content in your e-mail using Mail Merge. To do so, follow this formatting:
{{FieldName|Value to match|If it matches, display this}}
and you can even add in an else as well:
{{FieldName|Value to match|If it matches, display this|otherwise, display this}}

For example, if I want to display Howdy to anyone named Daniel and Hello to everyone else, I would write:

You can also do conditionals based on if the field begins with something or contains something as well. There’s a complete list of the conditional statements you can use on the Mail Merge add-on page:

12 thoughts on “Mail Merges in Thunderbird”

  1. I recently installed Mozilla Thunderbird. I am wanting to send customized emails… HTML format, not plain text. I can do that using Outlook or Outlook Express. I downloaded “Mail Merge” the add-on for Thunderbird – as some internet posts suggested. However, there is no add-on “install” feature for the Mail Merge download in Thunderbird. There is also no “install add-on” via the “tools” menu either. Instead, a window that pops up stating Mail Merge is not compatible with Mozilla 34.0.05 and therefore unable to open when using Firefox as the add-on opener application.

    Other than that I am stuck on how to install the “add-on” package for Thunderbird email app.

    What other options are there in Thunderbird (or other email application) in order to send HTML mail merged email letters – ones that are created in MSWord and use an excel (which can be converted to a .CSV file if needed) spreadsheet database?

    My computer’s operating system is Windows XP.

    Thank you in advance for any help or suggestions.

    1. Have you tried double-clicking on the add-on to run the installation? You will need to close Thunderbird in order to install it.

  2. “Project Manager”,

    It sounds like you are finding the add-on while browsing the web through Firefox, clicking on it, and Firefox is thinking you are trying to install it in Firefox. Since the add-on is for Thunderbird, you need to install it there, and not in Firefox. (Both Thunderbird and Firefox are Mozilla products.)

    Mozilla Add-ons provides some instructions:
    How to Install in Thunderbird
    1) Download and save the file to your hard disk.
    2) In Mozilla Thunderbird, open Add-ons from the Tools menu.
    3) From the options button next to the add-on search field, select “Install Add-on From File…” and locate the downloaded add-on.

    You can probably also replace step 3 with drag-and-drop (drag-and-drop the extension file into the Thunderbird Add-ons window).

  3. Exception… “Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIHTMLEditor.rebuildDocumentFromSource]” nsresult: “0x80070057 (NS_ERROR_ILLEGAL_VALUE)” location: “JS frame :: chrome://mailmerge/content/compose.js :: mailmerge.send :: line 631” data: no

    please help me i am unable to send the message i got above error

    1. I have had the same error message.
      Check if your list (csv file) contains any special characters. After deleting or replacing special characters in names such as á to a, é to e etc. Also do not forget to remove comas from names. It worked for me

  4. Thank you! Very helpful. I need a little more help though. I have a csv file with a Company Name and a DBA (doing business as) name. I need to choose if the DBA name is blank, then use Company Name. I don’t know how to disignate to the variable if it is blank or not? Can you give me an example, please? Thank you in advance.

    1. You could either handle this in the CSV file by changing all the blank DBA fields to an identifiable value like “&&&&” or you could use a conditional statement for this, like this. You could try something like:

  5. Thanks for the insightfull article. I’ve played around with mailmerge but seem to be unable to add more than 1 attachment per merge. Did anyone manages to do that?

    1. I have not had any issues adding multiple attachments as I create the email first and then do the mailmerge. Perhaps you have a restriction on your mail server for number of attachments or size of messages?

    1. Thanks! I’ll be sure to check out the new features. I really like this plugin and use it all the time.

Comments are closed.