I've been tagging messages with the label "Singularity Badges" in GMail as the emails were coming in (note to self: next time, also reply to the message at this point and they won't pile up!) So I thought I'd fire up Mail app, select all the messages with the label, hit Reply and Bob's your uncle.
If you've tried yourself in the past, you are probably aware that Bob is most definitely not your uncle! (The reply option is grayed out in Mail when there are multiple messages selected.)
So if you want to work this way, you have to write some AppleScript.
Being an AppleScript newbie, I was happy to see that Jake Albert had already done most of the work for me and shared his solution on Mac OS X Hints. I started with his code in Script Editor and applied the follow-ups suggested by Peter Bukowinski, Matt Harris, and Tom Wible. Instead of putting all the senders in to To field, however, I made the script put your default account's email address in the To field and put all the other recipients in the BCC field.
Here's the final script, released here under the open source MIT license:
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 (extract address from (the sender of (item i of themessage))) if thesenders does not contain thesender then set thesenders to thesenders & {thesender} end if set the was replied to of (item i of the themessage) to true end repeat set AppleScript's text item delimiters to ", " set thesenderstext to thesenders as text set AppleScript's text item delimiters to "" set newMessage to make new outgoing message tell newMessage set visible to true make new bcc recipient with properties {address:thesenderstext} end tell set toAddress to email addresses of item 1 of accounts as text tell newMessage make new to recipient with properties {address:toAddress} end tell activate end tell
Finally, I saved the script under ~/Library/Scripts as ReplyToMultipleEmails.scpt and used Quicksilver to add a hotkey combination to trigger the script.
To do this, I first made sure that my scripts folder was included and selected under Quicksilver → Catalog...

And added the Trigger from Quicksilver → Triggers... and assigned it to the hotkey ⌃ ⌥ ⌘ R.

With this script in place, you can reply to multiple email messages in Mail by selecting them and hitting your chosen hotkey combination. So I'm off to email everyone who put the Singularity badge on their sites with an update.
Hope you find this useful... enjoy!
Update: I noticed that when you use this script to reply to multiple messages, the "was replied to" flag on the messages is not set. I've modified the script so that the flag is now set but be aware of an issue with this: If you use the script to create a new message and then don't send it, the "was replied to" flags on the messages you were replying to will remain set. If you don't like this behavior, remove the line that reads set the was replied to of (item i of the themessage) to true from the script.
The Reply to multiple email messages in Mail article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.
A really nice solution for your problem Aral ;) only I get the impression you didn’t expect Singularity (or the way you put it out into the world) would generate this kind of interest.
I’m Curious about it !!
Hi Marius,
Thanks! :)
Once it launches, I think Singularity is going to generate _lots_ more interest.
Well As soon as i’ve got all the problems with the webserver figured out i’m posting the singularity badge on my blog ;) Just hope I’m on time to still get a glimpse before everyone else :P
If anyone is looking for a great place to buy vitamins and health products, check out
http://www.healthbuy.com/?aid=449667
Greetings,
Love the idea, but I get this error when running the script in Leopard using Mac’s Mail.app:
“Error number: -2753
Message: The variable thesenders is not defined.”
Can you advise?
Jon
bedava sitem, tr.gg trgg tr gg bekleriz
Dear Aral,
Thanks a lot for publishing your script. I was an Eudora user for years, switched to Apple Mail a year ago and they’re still some features that I’m missing. One is the Multiple reply with copy of each message, like you get when you reply to one message.
On Sep 9, 2008, at 11:02 AM, xxxxxxxx wrote:
+ message w/ quote level
What’s strange is that I can Forward 2 messages in a newly created one⦠Anyway, I was wondering why you chose to have a blank message? Well, at least this is what I get when I try using your script, with of course the e-mail addresses from the selected messages.
Thanks in advance, kind regards,
Mathieu
Hello,
How could this be modified so that the reply will quote the text of all the messages being replied to?
Hey, nice tips. I’ll buy a bottle of beer to that man from that forum who told me to visit your blog :)
Thanks for this AppleScript.
But I have a question, this works only for senders of emails. If there’s a Reply-To address for every email, how can I manage to reply to all Reply-To addresses for multiple email messages in Mail?
Where you reference the hint from MacOSX Hints, you didn’t include the link to that hint; it just takes you to a page to buy a domain.
Also, it would be even more useful to have an AppleScript to be able to select portions from multiple emails and quote them automatically in one reply.
Thanks a lot for your work on this script! I had over 120 email applications from freelancers that I had to respond to and I was trying to figure out a way to automate the process when I came across your script. It worked just as advertised! People like you are what make the internet great!
I needed to use this script to reply all, but to the recipients of the emails (i had been bcc’d on them) not the sender. I couldn’t get your script to work, but with a lot of modifications this worked great. Thanks for the start!
set thesenders to {}
set thesenderstext to “”
tell application “Mail”
set newMessage to make new outgoing message
tell newMessage
set visible to true
end tell
set selectedMails to the selection
repeat with themessage in selectedMails
tell newMessage
set RcptProps to {name:name, address:address} of item 1 of to recipients of themessage
make new bcc recipient at beginning of bcc recipients with properties RcptProps
set the was replied to of (item 1 of the themessage) to true
end tell
end repeat
end tell
My boss thanks U !!! and I do too :D
Okay pal, you saved me about 1.5 hours pasting the same message over and over… And now I can use this in the future. Great work & thank you!
YOU. ARE. AWESOME.
Thank you so much for this, it works like a charm!
Thanks, Patrick; you’re welcome :)
Thanks Aral, this has saved me hours.
Nice. Works great. Thanks!
HI there! Thanks looks really useful
Sorry I never done MAC programming before.
I downloaded QuickSilver. How do I actually get the script to work, where do I copy the script code to? Im trying to add to the Quicksilver Catalogue but no luck….It does not let me
How do I find ~/Library/Scripts
Many thanks
Bernie
Actually dont worry, just worked it out! Added your code to AppleScript editor, clicked RUN and, as you say, Bobs your uncle. Nice job.
Amazing stuff thank you so much!
wou;ld it be possible for you to help me to take legal action against abbey national, as they have removed me from my endownment mortgage without my knowledge. it iis as if i am dead, as the only reason that this sdhould occur, would be if one of the parties dies, then the other getsm a payout.n Sir i have the written evidence to confirm this, sent to me from abbey themselves
would it be possible for you to help me to take legal action against abbey national, as they have removed me from my endownment mortgage without my knowledge. it is as if i am dead, as the only reason that this should occur, would be if one of the parties dies, then the other gets a payout. Sir i have the written evidence to confirm this, sent to me from abbey themselves. If not you, would you guide me in the right direction please.
I would love to see something like this working on windows
marvelous… still works.
thanks
Excellent, saved me LOTS of time!
Thank you! this script saved my bacon (and an annoying hour of my time) ! Did just what it says on the tin.
Just what I need when people buy freestyle tickets online and I want to send a quick confirmation. Many thanks for that. It works a treat. It is my first experience of writing a script so I had to look up where to paste it (Applications-AppleScript-ScriptEditor for those of you in the same boat as me), but after that it was easy thanks to your instructions. I don’t have Quicksilver so just open and run the script whenever I need it. If I used it more frequently, I would certainly use a hotkey combination though. Thanks again.
This site got me so excited cause this is exactly what I need to do but don’t know how to do it…
Sorry Im a bit retarded with macs.
How do I save this script? I need a step by step explanation…