An AppleScript to move Mail messages to an iPod

Mar 11, '04 09:27:00AM

Contributed by: lucabrasi

With the Notes capability of newer iPods, I thought it would be nice to be able to quickly copy emails to my iPod. After searching this site and googling a bit, I decided to try my hand at AppleScript. A lot of this script is based on Apple's "Clipboard to Note.scpt" which can be freely downloaded from Apple. Copy this to ~/Library -> Scripts -> Mail Scripts/ and update Mail.app's Script Menu to use. If you save this file as something like "Mail2iPod___ctl-i", you'll be able to execute it by pressing Control-I. It also works great when combined with Mail.app's rules.

(*
Mail2iPod v1.0 (March 1, 2004)
Jeff McDonald (email address in full script)
This is free unsupported software.

Saves selected email to iPod Notes Folder under a new folder called "Mail"

Some code is from Apple's "Clipboard to Note.scpt" from their
iPod Applescripts: http://www.apple.com/applescript/ipod/

1. Will create Notes:Mail if either folder doesn't exist.
2. Assumes only one iPod is mounted, if you need more than
   one refer to Apple's code
3. You can highlight several messages at once and run the
   script, it will copy them all.
4. Notes can only be 4Kb each, so it will split long messages
   into several parts w/ hyperlinks. 
5. It will replace / overwrite a message if it has the same
   subject as one already on your iPod.
6. If the message has no subject, it will be named Sender +
   a unique message id.
7. If the message is HTML, you'll get the entire raw source
   of the email... bunch of ugly headers.
8. If you click it and your iPod isn't attached, you'll get a
   message telling you this.
*)
[robg adds: Due to the length of this script, I have uploaded it to the macosxhints server -- click to download: Mail2iPod.zip.]

Comments (2)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20040302091419424