Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Retrieve email information from Address Book Apps
Recently, I needed a plaintext list of all emails in my Address Book. Although Address Book has exporting capabilities, it exports all contact information. Needing only email addresses, I did the following:
  • In Mail.app create a new message
  • In Address Book, select all contacts (Command-A) and drag them to the To: field in Mail's new message window
  • Select the To: field and select all recipients (Command-A)
  • Paste the resulting comma-separated email addresses wherever needed
  • Last, but not least, delete new message without sending (unless you have something really important to communicate with everyone you know).
    •    
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[7,135 views]  

Retrieve email information from Address Book | 5 comments | Create New Account
Click here to return to the 'Retrieve email information from Address Book' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Retrieve email information from Address Book
Authored by: miles_thatsme on Jun 11, '04 01:44:55PM

Alternatively, pick the excellent Mail Scripts package, and use the "Export Addresses" script, which will export any chosen fields.

http://www.versiontracker.com/dyn/moreinfo/macosx/16217

The only downside to this is that it won't pick up which of multiple addresses you've selected for a distribution list. The author tells me it is not possible to applescript that.



[ Reply to This | # ]
Retrieve email information from Address Book
Authored by: taxi on Jun 11, '04 11:02:16PM

Or, you could download contacts and type the following into your Terminal (after installing!):

~ $: contacts -l -f "%n %e"

Note that you must have the -l line, else the names and emails will be truncated.

The big advantage of this is that you can pipe it through a command that would only grab your contacts that have an email address:

~ $ contacts -l -f "%n %e" | grep @

Or look in the man page to find other options.

[ Reply to This | # ]

Retrieve email information from Address Book
Authored by: DanFrakes on Jun 14, '04 02:24:11PM

andrejbl, this is very cool. I love these types of "figure out a way to do something using the OS's built-in functionality" tips :-)



[ Reply to This | # ]
One step easier
Authored by: echo on Jun 14, '04 05:04:05PM

I do this one step easier by selecting all from the Address "Panel" (called that in 10.3.4, think it has been named differently in past versions) directly from Mail (Window/Address Panel), instead of the Address Book, where instead of dragging, you can simply click the "To:" or "CC:" button, to place all addresses in one of those fields, then select them and cut + paste them where you want them.



[ Reply to This | # ]
Retrieve email information from Address Book
Authored by: borsad on Jun 15, '04 02:15:23AM

How about simply typing the @ symbol in the search field of Address Book?



[ Reply to This | # ]