Archive any selected Mail message as a .emlx file
Nov 28, '06 07:30:02AM
Contributed by: daleminter
Want to file your emails outside of Apple Mail? Do you wish you had the same functionality as Entourage's 'drag and drop to a folder' in Apple's Mail? Are you in an office environment and need to save client emails to the server? Using a keyboard shortcut, this hint will export your Apple Mail message as a .emlx file (the best type -- as it appears in Mail, with all attachments enclosed), prompt you as to where you want it saved, and how you want the file named. Here's how to do it:
- Download and install MailActOn.
- Open Mail's Preferences and go to the Mail Act-On section. Enable Menu bezel automatically disappears, and set Fade after to one second (this is important, as it otherwise locked up on me).
- Open Script Editor and copy and paste this script. Save it somewhere where you can find it.
- Create a new Mail rule as follows:
- Description: Act-On: a | Archive Mail (this naming lets the Mail Act-On plug-in work with the rule)
- If any...: Every Message
- Perform...: Run Applescript, and point it at the script you just saved.
- Optional: If you want Mail to move your message after archiving it, add another action to the above rule: Move Message, Delete message, etc.
Now select an email and press ` (the key to left of 1) and then a. Follow the instructions and you are done. Pretty cool, huh? There are a couple of additional things I'd like to do, such as handling filenames with colons in them (replace the colon with an underscore) and perhaps automatically print to the default printer, but the script works well in its current form.
[robg adds: As a strong note of caution, on my machine (a 2.66GHz Mac Pro) the combination of Mail Act-On and this script was always fatal to Mail. Regardless of what combination of Mail Act-On settings I used, Mail would crash when I tried to invoke this script. If I ran it from Script Editor, however, it worked fine. And other Mail Act-On actions worked fine, so I'm not sure what's going on.
You can still use this script, of course, via the Scripts menu, which is where I've moved it. To make it show there, save the script to (create the folders as necessary) your user's Library -> Scripts -> Applications -> Mail folder, and name is something like Archive message. It will now show in the Scripts menu within Mail, where it can be used with any one message selected.]
Comments (5)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20061119021103186