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

Import Mail's Recent Contacts into Address Book Apps
I needed to find a quick and dirty way to put all of Mail.app's stored email addresses into my Address Book. It turns out that these are stored in a SQLitev3 database named MailRecents-v4.abcdmr in ~/Library » Application Support » AddressBook/. To import these into Address Book's contact list, all I needed to do was this:
  1. Install SQLitev3 (sudo port install sqlite3 if using MacPorts)
  2. Dump the contents of the recents table to a text file with this series of commands in Terminal:
    $ sqlite3 ~/Library/Application Support/AddressBook/MailRecents-v4.abcdmr
    sqlite> .separator ,
    sqlite> .output /path/to/outputput/file/Recents.csv
    sqlite> select * from ZABCDMAILRECENT;
    sqlite> .exit
  3. Now use Address Book's File » Import function to import the newly-created Recents.csv as a text file. You will be prompted to choose which fields to import as what, with the first/last names and email addresses from your recents available.
[robg adds: While this hint worked as described, there are a couple of things that strike me as overly complex about it. First, the easiest way to get all your recent contacts from Mail into Address Book starts in Mail. Select Window » Previous Recipients, press Command-A when the new window appears, and then click Add to Address Book. However, you won't get any control over what happens using this method, so perhaps you'd like to try the method in this hint. If so, sqlite3 is installed by default in 10.4 and 10.5 (it's in /usr/bin), so step one shouldn't be required. In the end, I'm not really sure what advantages this method may offer over the built-in solution, but it is interesting to see the structure of the recent contacts file in sqlite3.]
    •    
  • Currently 2.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[12,379 views]  

Import Mail's Recent Contacts into Address Book | 1 comments | Create New Account
Click here to return to the 'Import Mail's Recent Contacts into Address Book' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Import Mail's Recent Contacts into Address Book
Authored by: jimg521 on Dec 15, '09 06:01:23AM

Thanks robg, that is perfect and exactly what I needed!



[ Reply to This | # ]