(* I have modified this from the original which can be found here: http://www.scriptbuilders.net/files/savemailattachments1.0.html -Ryan Hunt www.ryanhunt.biz *) (*Mail attachment save script by Luke Jaeger www.trickfilm.org This script will mine a list of Mail messages for attachments and save them to a destination you choose. The script creates a subfolder for each message with attachments, named with the subject of the message and its date sent. All attachments are saved with their original names. Messages without attachments are ignored. After running, the script will send a mail message detailing what was saved. The script is ready to use as a rule action in Mail - just fill in the specifics of your destination folder and recipient. I wrote this script to deal with large art files sent to me via Mail. Hope you find it useful! *) --comment the first two lines ("using termsÉ" and "on performÉ") and their accompanying "end" statements when testing. Uncomment them to use this script as a Mail rule function. using terms from application "Mail" on perform mail action with messages theMessages for rule theRule tell application "Finder" --here's where you tell Finder to mount your server volume, etc set theOutputFolder to "Macintosh HD:Users:rhunt:Faxes:" --(here's where you tell it the main folder to save in) end tell tell application "Mail" --comment the following line when running this script as a Mail.app rule function - uncomment it for testing --set theMessages to selection repeat with theMessage in theMessages --does the message have attachments? if not, then skip it if (every mail attachment of theMessage) ­ {} then --save the attachment to the subfolder set theAttachments to (every mail attachment of theMessage) repeat with theAttachment in theAttachments set thePath to (theOutputFolder as string) & (name of theAttachment) --if same named file already exists in subfolder, skip it --otherwise, save it and get its size if not (exists (alias thePath of application "Finder")) then save theAttachment in thePath end if end repeat -- set read status of theMessage to true end if end repeat end tell end perform mail action with messages end using terms from