Sending an email to senders of selected emails in Mail.app
Solution 1:
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