AppleScript Wanted, Dead or Alive

Reader Michael Rountree offers up this head-scratcher:

As a relatively new user of Mac OS 10.3.8 and Mail 1.3.9, I am perplexed by a feature which almost seems like it is built into the email client, yet isn’t really. My office relied on a single “companyname@domain” type email address until this year, with only one computer retrieving emails then printing them for distribution. This year, after upgrading computers, we now have distinct email addresses for all employees; however, we maintain the older email address as a catch-all. Most of the email arriving via this address, however, must be redirected to the appropriate employee’s account.

The problem is that I cannot find a way to simplify the process. When multiple emails are selected, the Redirect menu option is grayed out. I know how to set up Rules, which can automatically Redirect based on certain criteria, however that criteria does not seem to include any features which our receptionist can control. She is responsible for briefly examining the email in the old account and then passing it on; I would prefer to have that visual examination to weed out the occasional unsolicited junk. My hope was that I could set up mailboxes and have her drag the email to be redirected to a mailbox, whose contents are all automatically redirected to an account. I have searched online and tried to set up Rules to do this, but cannot find any way to select an email based on which mailbox it resides in.

Do you know of any scripts or Mail plugins that might accomplish what I am after? Or is there an alternative to redirecting (I don’t like forwarding since it marks the messages as coming From: our receptionist)? Will I perhaps need to go to a different email client?

I haven’t located an AppleScript that can do this (but I’m sure I’ll hear about it if one exists), so let’s accomplish the task through trickery.

You don’t need to go to another email client, but this would be a heck of a lot easier if you did. If, like Entourage, Mail had a Folder rule condition—as in “If Folder is Bob’s Mail”—your secretary could simply create a rule that redirects anything placed in that folder to Bob. Alas, Mail lacks this condition. But you can fake it.

This fakery is achieved by creating new accounts and treating them like folders. It’s like this:

1. Create a new account and call it Bob’s Mail. Fill in all the fields in the Account Information tab with bogus information (without something in these fields Mail won’t let you create the account).

2. Click the Advanced tab and disable the Include When Automatically Checking for New Mail option (but be sure that Enable This Account is checked). You don’t want to check this account ever, it’s simply serving as an outbox for the secretary.

3. Create a new Rule called Bob’s Mail. Configure the first line of the rule to read Account Bob’s Mail. The second like should read Redirect Message to Bob’sEmailAddress (where Bob’sEmailAddress is, well, Bob’s real email address). Click the Plus button next to Redirect Message and add a Move Message to Mailbox Trash condition. This clears the message out of the Bob’s Mail account so it’s not resent the next time you work this scheme (alternatively you can create a different mailbox called Redirected Messages and channel the email here after it’s been sent).

4. Create accounts and rules for all the people you wish to redirect mail to.

5. Finally, when it’s time to sort the mail, the secretary can fling email into the appropriate accounts, open each account, select every message in it, and choose Apply Rules from Mail’s Message menu. The Bob, Jane, Dodo, and Biffy rules will kick in and redirect the mail to the recipient’s true email address. Note that these messages will be sent via the account that appears at the top of the list in Mail’s In box. For this reason, make sure a working account appears at the top of this list.

Pretty? Hardly. I look forward to an onslaught of messages that begin “With this simple AppleScript you could do this in an instant.”

Ladies and gentlemen, start your engines.

Shop Tech Products at Amazon