Hi Everyone,
I have been using an email address extractor Applescript that works perfectly to extract addresses from the ‘sender’ in Mail. Because of the way I now have the web form set up, I now need to extract the email addresses from the ‘reply-to’ field in Mail. Is it possible to modify this Applescript (the one I have been using) to do this?
tell application "Mail"
set selectionMessage to selection -- just select the first message in the folder
set thisMessage to item 1 of selectionMessage
set theseMessages to (every message in (mailbox of thisMessage))
repeat with eachMessage in theseMessages
set theFrom to (extract address from sender of eachMessage)
do shell script "echo " & quoted form of theFrom & return & " >> ~/desktop/extracted.txt"
end repeat
end tell
Thanks for looking!