May 24, '07 07:30:00AM • Contributed by: ob1cannoli
After a bit of AppleScript work, I came up with this script:
set thesenders to {}
set thesenderstext to ""
tell application "Mail"
set themessage to the selection
repeat with i from 1 to the number of items in themessage
set thesender to (the sender of (item i of themessage))
if thesenders does not contain thesender then
set thesenders to thesenders & {thesender}
end if
end repeat
set AppleScript's text item delimiters to ", "
set thesenderstext to thesenders as text
set the clipboard to thesenderstext
end tell
It creates a comma-separated list of the senders of the selected messages, and then sets the clipboard to said list (it also removes duplicates). Select a bunch of messages in Mail, run the script, then paste the clipboard's contents into a new message.
[robg adds: This worked as described in my testing.]
