There was a recent post on the the Mac Rumors Forum with this AppleScript question:
“I have a rule in Mail, which moves specific emails to a specific email folder… Now I need an AppleScript to run in conjunction with the rule, which will save each email as a txt file in a folder on my desktop…. Can anyone suggest how I go about this?”
You remember that I whipped up an Export Apple Mail Messages to Text Files script just a few weeks ago that pretty much fits that description, right? So I thought that, in the process of turning it into something that Apple Mail can use, I could do a little walk-through for you guys of how to write a script like this in the first place!
Easy, right? A walk in the park.
HA! 😉 (And how does that Robert Burns poem go again?)
“Hmmph. That’s weird.”
After a short burst of hack-fu, I had a script that would work within Apple Mail…with one small caveat: When selecting the message and applying the rule manually, everything worked… But when a message arrived on my Exchange email account and triggered the script by a rule, it exported the content of the previous message to the resulting text file.
Hmmph. That’s weird. “I must have made a mistake somewhere…”, I said to myself.
But no matter what I tried, it always exported the wrong file! I called in the big guns for help with this post on the MacScripter website. Ben Waldie — a guru in AppleScript community and author of many excellent books about Automator— personally pitched in to try and sort this out…. sadly to no avail. (Thanks again, Ben!)
A quick search around reveals that this may not just be me: I saw this Comment Thread and also this post on stackoverflow.
Is this a wide-spread bug with Apple Mail, Exchange, and AppleScript? I’ve noticed a few other shall-we-say… anomalies with the way OS X works with Exchange — and I’m starting to wonder if this is another to add to the list.
Twitter Comment
Snow Leopard Issue With Mail, Exchange, and AppleScript rule … [link to post]
– Posted using Chat Catcher
I Have the same problem with ruels and mail.
Is there any fix in sight ?
I just checked around again and I don’t see anything new…. let’s keep our fingers crossed that it’ll be fixed in 10.6.4! 😉
I have had this exact problem too. It seems to be a bug. I have developed a kludge that works around the issue but it’s far from ideal. If you are interested I can let you know what I did.
Absolutely — that’s what makes a good comment thread! 😉
Fire away!!!
Yeah, if you have a workaround it would be awesome, even if it comes a year late.
Count me in as well, as of 10.6.7 this issue has not been fixed, is there any way we can post a bug report for this ?
I’m going to try and file a bug report on this… will let you all know if I hear anything!
I’ve filled a bug report, ID 9329457 in case you want to mention it on yours.
Best Regards, Ed.
Awesome Ed — and anyone else who files a bug report on this should reference that number as well!