How to extract email addresses from message (not the sender)
I saw this post which has been archived. I need to know how to apply the script?
--
Pierre L. Québec
try
*set TID to AppleScript's text item delimiters*
*set AppleScript's text item delimiters to space*
*tell application "Mail"*
*repeat with theMessage in (get selection)*
*set theText to text items of (get content of theMessage)*
*repeat with thisItem in theText*
*if thisItem contains "@" then*
*set theAddresses to theAddresses & (thisItem as text) & return*
*end if*
*end repeat*
*end repeat*
*end tell*
*set the clipboard to theAddresses*
*set AppleScript's text item delimiters to TID*
*on error*
*set AppleScript's text item delimiters to TID*
*end try*
*the clipboard*
--