Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Archive any selected Mail message as a .emlx file Apps
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:
  1. Download and install MailActOn.
  2. 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).
  3. Open Script Editor and copy and paste this script. Save it somewhere where you can find it.
  4. 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.
  5. 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.]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[10,142 views]  

Archive any selected Mail message as a .emlx file | 5 comments | Create New Account
Click here to return to the 'Archive any selected Mail message as a .emlx file' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Archive any selected Mail message as a .emlx file
Authored by: NB on Nov 28, '06 08:22:41AM

Huh? It seems a bit complicated, or I missed the point.
Did you know you can copy the contents of a local mailbox (not a smart or an inbox, the ones that have folder icons) just by dragging it to the Finder? Add some AppleScript and iCal sugar to it, and you automate your emails backup.



[ Reply to This | # ]
Archive any selected Mail message as a .emlx file
Authored by: daleminter on Nov 28, '06 08:52:59PM

You missed the point. That gives you the ability to drag an ENTIRE folder out of Mail to the finder. But can you identify each specific email? No, unless you remember what 80456.emlx conatins...

Can you file them individually on the server and know what they refer to? This script gives you this ability, while still retaining it in Mails emlx format.

We have actually found that saving the above apple script as an application and then placing it in the dock is easier than the keyboard shortcut key vial Act-On...

---
Tecsol Limited
Auckland, New Zealand
www.tecsol.co.nz



[ Reply to This | # ]
Archive any selected Mail message as a .emlx file
Authored by: daleminter on Nov 28, '06 08:55:38PM

Yeah, it does seem to lock up Mail. We ended up saving the script as a Run only application and putting it on the dock... but Rob's script menu is possibly more convenient for the end user.

---
Tecsol Limited
Auckland, New Zealand
www.tecsol.co.nz



[ Reply to This | # ]
Archive any selected Mail message as a .emlx file
Authored by: ronaldt on Nov 29, '06 12:25:27AM

Good hint but... this script only works with individual messages. Would it be possible to adapt the script so that you can export multiple selected messages at ones? For example select the target folder ones and export all the selected messages as individual files combining the message subject and the message ID in the filename to prevent saving messages with the same filenames.

I tried fiddling with the script but due to my limited knowledge of AppleScript I couldn't get it to work. Maybe someone else can..



[ Reply to This | # ]
Archive any selected Mail message as a .emlx file
Authored by: dan55304 on Nov 29, '06 05:37:58AM

I've looked at this over the years but never wanted to take the time to get to know how to make it work. I now use iWeb because it's trivial to use. How does Galerie compare to iWeb?



[ Reply to This | # ]