Is there a way to automatically copy all the email addresses from an email's To, Cc, Bcc headers etc in Thunderbird? I am currently right clicking and doing "Copy Email Address" for each one but this is obviously unsatifactory.
11 Answers
Yes, you can. Just use Message Source in the View menu.
You'll see all the same details as in the header of the e-mail but in a format you can copy and paste...
In more detail. You'll need to copy the email addresses (they are separated by commas) into one of the To: fields. As soon as you hit Enter Thunderbird will give each address its separate line. Quick and easy. If you already have at least one address in a To: field, you may change the second To: into Cc: before you hit enter. Then all the added addresses are Cc!
What I usually do is ... Forward email. I have my TB configured to forward inline. Then, there you get all the headers in text. I just copy the mails and the paste in the new message.
Done ;)
- 270
This answer builds on Dee’s answer, the comments by Tai Viinikka and Dan Stevens, and the attempt by Giacomo Ciani to edit Dee’s answer. Aside from some editorial polishing, all credit should go to them.
It is possible to copy email addresses from a message’s “To”, “Cc”, and “Bcc” headers in Thunderbird. It is not clear what “automatically” means in this context.
Just use “Message Source” in the “View” menu. You’ll see all the same details as in the header of the email, but in a format you can copy and paste.
In more detail: You’ll need to copy the email addresses (they are separated by commas) into one of the addressee fields. As soon as you hit Enter, Thunderbird will give each address its separate line. Quick and easy. You must have at least one address in a “To:” field; then you can change additional “To:” fields into “Cc:” or “Bcc:” before you hit Enter.
As noted in the comments on the original answer, this may result in Thunderbird inserting double commas between entries, and then interpreting one of the two commas as part of the address, which then does not work. Giacomo Ciani reports that, on his system (Thunderbird 45.4 on Windows 10), this is due to newline characters in the copied text. For example, if the source displays:
addr1,
addr2
and you copy this text,
both the comma and the newline will be interpreted as separators,
resulting in addr1,,addr2
when you copy into the Thunderbird address field.
Then, apparently, the second comma is interpreted as a literal character
and not a separator.
This results in the two addresses being parsed
as addr1 and ,addr2,
which obviously then does not work.
The solution Giacomo found is to copy the addresses from the message source
and paste them into Notepad++
(or any other text editor that can find and replace newline characters)
and remove all \n and \r characters,
then paste the result in the Thunderbird address field(s).
Not as quick or convenient, but it works.
The “it works” statement (above) is quoted from Giacomo’s submitted text (I have not tested it). Stéphane Gourichon subsequently added the following comment:
This simple solution is actually a hack that works only if all e-mail addresses contain only 7-bit ASCII characters. In all other situations, the message source encodes them conforming to RFC 2047: MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text. Example: Stéphane becomes
=?UTF-8?Q?St=C3=A9phane?=. jlanza’s solution does not have this problem.
- 22,532
All,
I wrote this bash script that almost does all of what is needed to extract all email addresses from TBird, externally. Still working on the filter some.
#! /bin/bash
# Email Address extraction script to get Thunderbird EMail addresses from email files.
# Get current directory
DIR="$( cd -P "$( dirname "$0" )" && pwd )"
curdir="$DIR";
#echo "C=>$curdir";
# Declare the Local Folders dir for Thunderbird
tbdir="/home/$USER/.thunderbird/$profile.default/Mail/Local Folders";
# Change to First TB directory
cd "$tbdir";
# Run the grep statement to get the addresses
grep '^\(From\|To\|Cc\|CC\Bcc\|BCC\):' Drafts | grep -o -E '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}' | sort -f | uniq -i > /home/$USER/myfiles/all-addresses.txt
grep '^\(From\|To\|Cc\|CC\Bcc\|BCC\):' Inbox | grep -o -E '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}' | sort -f | uniq -i >> /home/$USER/myfiles/all-addresses.txt
grep '^\(From\|To\|Cc\|CC\Bcc\|BCC\):' Sent | grep -o -E '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}' | sort -f | uniq -i >> /home/$USER/myfiles/all-addresses.txt
# Declare the gmail.com dir for Thunderbird
tbdir="/home/$USER/.thunderbird/$profile.default/Mail/gmail.com";
# Change to New TB directory
cd "$tbdir";
grep '^\(From\|To\|Cc\|CC\Bcc\|BCC\):' Inbox | grep -o -E '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}' | sort -f | uniq -i >> /home/$USER/myfiles/all-addresses.txt
# Declare the IMapMail dir for Thunderbird
tbdir="/home/$USER/.thunderbird/$profile.default/ImapMail/imap.googlemail.com/[Gmail].sbd";
# Change to New TB directory
cd "$tbdir";
grep '^\(From\|To\|Cc\|CC\Bcc\|BCC\):' 'All Mail' | grep -o -E '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}' | sort -f | uniq -i >> /home/$USER/myfiles/all-addresses.txt
# Sort the output for unique addresses
cp /home/$USER/myfiles/all-addresses.txt /home/$USER/myfiles/all-addresses.old.txt
sort /home/$USER/myfiles/all-addresses.old.txt | uniq -u > /home/$USER/myfiles/all-addresses.txt
# Change back to current directory
cd "$curdir";
Give it a go and tweak it as needed and report your changes here!
Cheers!
OMR
- 39
I have answered a similar question: create address list (mailing) from email recipients.
EMail Address Crawler is a very old Thunderbird add-on that extracts email addresses from all the emails within a folder. It retrieves addresses from the email source code (header and body). This is useful when an email is forwarded or when there are extra addresses within the email header (e.g. redirection email addresses):
- open the context menu on an folder of emails
- select Crawl folder for email addresses
- choose the destination mailing list (or choose a new one)
- choose some options, click OK
- then the add-on extracts email addresses from the folder emails content and stores them within the chosen mailing list
But, EMail Address Crawler may not compatible with your Thunderbird version. In order to force install, disable extensions.checkCompatibility in the about:config or simply use Disable Add-on Compatibility Checks. However, even disabling compatibility check, EMail Address Crawler may not be usable (the folder context menu may just open the address book window).
Moreover, there is another old add-on: CrowdMailer. This very basic add-on is still compatible with recent Thunderbird versions:
- copy-paste the email source code into the CrowdMailer dialogue box
- CrowdMailer extracts the email addresses
- CrowdMailer creates a new email filled with these extracted addresses
But I did not found a way to save these addresses within a mailing list... who has an idea?
I've found quite a simple solution to what I believe you're looking for. I set up squirrel mail. http://squirrelmail.org/
It's not pretty but it does the trick. It shows all addresses inline in the email as the actual email addresses and not the names so you can just copy and paste them.
Hope that helps
Craig
- 11
There is a new add-on that does the trick: emailpicky4.
Right-click over the folder from which you want to import email addresses to your contacts and choose "Pick IDs From This Folder"
some nice refinements are available in the popup.
https://addons.mozilla.org/en-US/thunderbird/addon/emailpicky-4/?src=search
- 11
EASY:
- Use 'ImportExport Tool' Thunderbird addon to export all messages to disk (all in a single file OR as individual text files).
- Use Power Email Address Extractor to extract email addresses from the above files. The program is VERY flexible.
Update:
You can actually skip step 1 by extracting with Power Email Address Extractor directly the Thunderbird DB inbox file (like: c:\Users\Me\AppData\Roaming\Thunderbird\Profiles\5akde98.default\Mail\mail.yourserver.com\Inbox.sbd\Inbox )
- 2,171
From a french forum, working for Thunderbird 60.
In Thunderbird
- Go to
Settings - Click on
Advanced - Search
extensions.strictCompatibilityand set it atfalse
In your browser
- Search for EmailPicky 4 on Thunderbird addons and download
In Thunderbird
- Go to
Tools - Slick on
Settings icon - Choose
Install module from a file - Choose the file
emailpicky_4-4.0-tb.xpi - Restart
You are good, your can right click on any folder and Crawl folder for email addresses.
- 143
I add the following to the hints of olibre and Antoine's:
With Thunderbird Addon "Address bulk copy" you are able to copy the complete distribution list with one click to the clipboard in the needed format.
The clipboard contains all email addresses from "To" and "CC" and if it is your own email also "BCC".
This addon in version 1.0.3 (filename: address_bulk_copy-1.0.3-tb.xpi) was last updated on 2013-08-19 and will probably not be further developed but:
it works with Thunderbird up to version 52 and with the described trick:
extensions.strictCompatibility=false
this addons works probably with the current Thunderbird version 60.5.0
Below is the link to the addon (use the first one): tag - bulk -> "Address bulk copy"
- 1
If you have several mails, then I would just export all the emails and write a little script, that extracts all the email addresses from the files. Then you really have it automatically. Of course that's only good, if you have more than one email.
- 392