Mail.app Recipients List – Get List of Recipients for One Email Account

emailgroupmail.app

I use mail.app to interact with about a dozen different email accounts, which I use for different purposes. I need to create a list of the senders (or recipients) of just on of those email accounts. Contacts.app is completely useless as it is mostly full of obsolete contact from previous jobs and I've never figured out how to clean it out. But since recipient auto-complete functions properly, mail.app must have access to senders/recipients directly and I just want to access that information for a specific single email account.

Best Answer

Here is a 2 step process to do that.

Part I

First create a Smart Folder in Mail.

There you will sort all emails specific to a selected account.

smart folder

You can skip the above part and sort by account then select the messages from a single account.

Part II

Now use (Copy) one of those Apple Scripts (Thank you Matthieu Riegler) in to your AppleScript Editor.app

tell application "Mail"
    set theSenderList to {}
    set theMessages to the selected messages of message viewer 0
    repeat with aMessage in theMessages
        set end of theSenderList to (extract address from sender of aMessage)
    end repeat
    set AppleScript's text item delimiters to " "
    set the clipboard to (theSenderList as string)
    set AppleScript's text item delimiters to ""
    beep
end tell

Now back to the Mail Smart folder, and select as many emails as you want there (or all).

Back to Apple script, click run and it will extract the addresses of the selected emails to your clipboard. Once done....

Open new Notes or other empty text document and click Paste to get the addressees collected.