Glitches with Snow Leopard, Exchange, and AppleScript?

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.

Anyone else have the same issue? Please post in the comments below!

A description of what you’ve found out would be great (especially if it solves the problem) — but even a “Me too!” is helpful.

10 Responses to “Glitches with Snow Leopard, Exchange, and AppleScript?”

  1. MrSnowLeopard (Mark Stanford) February 23, 2010 at 1:48 am #

    Twitter Comment

    Snow Leopard Issue With Mail, Exchange, and AppleScript rule … [link to post]

    Posted using Chat Catcher

    • Bernd May 11, 2010 at 3:11 pm #

      I Have the same problem with ruels and mail.

      Is there any fix in sight ?

  2. Justin Lancy May 11, 2010 at 5:29 pm #

    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! 😉

  3. matadan June 5, 2010 at 8:50 am #

    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.

    • Justin Lancy June 5, 2010 at 8:53 am #

      Absolutely — that’s what makes a good comment thread! 😉

      Fire away!!!

    • Ed April 28, 2011 at 8:03 pm #

      Yeah, if you have a workaround it would be awesome, even if it comes a year late.

  4. Ed April 23, 2011 at 8:12 pm #

    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 ?

    • Justin Lancy April 25, 2011 at 4:36 pm #

      I’m going to try and file a bug report on this… will let you all know if I hear anything!

      • Ed April 25, 2011 at 4:54 pm #

        I’ve filled a bug report, ID 9329457 in case you want to mention it on yours.

        Best Regards, Ed.