Sending an email to senders of selected emails in Mail.app

emailmail.app

I want to select multiple messages in a Mail.app folder by hand, do X, and then have a new mail message window appear with all those senders in the "To:" or "Bcc:" field. What is that magical X option?

Is it even built in, or do I need to find\write some Applescript? It looks like Automator doesn't have actions to grab senders from mail messages, so that's no way forward.

I am blown away that this is not as simple as selecting the messages and hitting reply. (It's greyed out, if you try.) I found this discussion about the same problem, but there was no real answer offered besides "try another email client" and "create rules for incoming mail that auto-replies". Terrible!

Best Answer

Try this AppleScript (using 10.7.3).

Select the messages you want to reply to before executing the script.

tell Application "Mail"
activate
set selectedMessages to selection
set countMessages to (count of selectedMessages)
if countMessages is equal to 0 then
    display alert "No Messages Selected" message "You must select a message first."
else
set theMessage to make new outgoing message with properties {visible:true, subject:"My Subject", content:"My Body"}
repeat with i from 1 to countMessages
    set theInput to item i of selectedMessages
set theName to sender of theInput
tell theMessage
    make new to recipient at end of to recipients with properties {name:theName}
end tell
end repeat
end if
end tell