Create your own list of email addresses from your inbox
Posted on : 09-15-2009 | By : Cool Geex | In : Script Editor, Snow Leopard
0
Like most, I’m getting everyday tons of emails, I’m not saving all the addresses, but maybe I should.
I figured that if I’ll want to promote something one day I can use that list, so I wrote a script that captures all the email address to a file.
I’m using Macintosh Apple Mail and using the script editor.

This Is the Script:
[AppleScript]
tell application “Mail”
set theSelectedMessages to selection
set selectionCount to (count of theSelectedMessages)
if selectionCount is greater than 0 then
repeat with eachMessage in theSelectedMessages
set theAddress to extract address from sender of eachMessage
do shell script “echo ” & quoted form of (theAddress as text) & “>>~/tmpEmailList.txt”
end repeat
do shell script “cat ~/tmpEmailList.txt |sort|uniq >~/desktop/emailList.txt; rm ~/tmpEmailList.txt”
else
display dialog “Please Choose one OR more msgs”
end if
end tell
[/AppleScript]
Related posts:
- Place Google Voice calls directly from iPhone
- Move downloaded DMG files automatically
- Create an Application that Start Google Chrome in Incognito Mode
- Google Chrome Incognito – Mac OSX Perfect Solution









