Without further ado, here is a short Applescript to extract all email addresses from Contacts.app on Mac OSX 10.8+ and dump them to a new TextEdit file. It could be converted to earlier OSX versions without much difficulty probably, since I think the only difference is the Contact Manager app used to be called "Address Book" instead of "Contacts".
Here's the code:
set unique_emails to {}
tell application "Contacts"
repeat with this_person in people
repeat with this_email in every email of this_person
copy the value of this_email & "
" to the end of unique_emails
end repeat
end repeat
end tell
tell application "TextEdit"
activate
make new document
set theDate to current date
set text of document 1 to unique_emails as text
end tell
One thing to note is that the copy the value of ... line literally includes a newline within the quotes. This causes an actual newline to be appended to every email address. If you would rather the email addresses be comma separated, you would use a comma here instead.
Have fun!