Problems with Mail to KGTD

A number of users have reported that when their mail rules activate Mail to KGTD, they get an error type 8. I’ve tracked down the CAUSE of this problem, but I’m not quite at a solution yet.

The cause is that when messages come in, they don’t seem to have message IDs anymore. Since my script requests a message ID, everything borks when it tries to get it. Once messages are properly received (after rules are run), they have IDs (like they should), which is why Mail Act-On continues to work, as will the rule if you edit it and then request that the new rule run on all messages in your inbox.

The script also works fine from Quicksilver, LaunchBar, the scripts menu, FastScripts… Any way you kick it off except for on an incoming mail rule will work just fine.

As far as I can tell, this is a bug in Mail (one of many Applescript bugs which haven’t been fixed for many, many, updates, I’m afraid). It was introduced during a recent security update, which I hadn’t yet installed, which is why I was having trouble replicating this error.

The best I can do, I think, is to remove the ability to create a link to the original message, which will avoid the need for a message ID, but also loses the link, which I know a lot of users like. I’m hoping I can find a way around that.

So, at any rate, I’ve found the root cause of the problem and I’m working on a fix. I’ll post an update here once I have a fix or workaround.

In the meantime, please let me know in the comments whether or not you make use of the “link” feature, or whether you’d just as soon see it go by the wayside. It takes a looooong time on some folks’ Macs, so perhaps it’s just unnecessary.

Twitter, Facebook

Written on August 30, 2006