Attachment extractor for mail

Hi there,

I’m a real beginner and looking for some help on how to write something that will do the following in Apple Mail 4 on Snow Leopard to help me reduce the size of my mailboxes:

Identify a mailbox
Extract all attachments and move to a specified Finder folder
Insert a link into each mail message that when clicked on, will take you straight to the extracted file.

I have been running Outlook through VMWare fusion until recently, and want to be able to stop running Windows altogether so have switched to the native Apple Apps. This is the only thing I miss from my Windows transition ( I had the Kopf outlook attachment remover).

Thanks for any help you can offer,


Model: MacBook Pro 2009
AppleScript: 2.3
Browser: Safari 531.9
Operating System: Mac OS X (10.6)


welcome to MacScripter.

The main problem is, you cannot change the content of an incoming mail with AppleScript for adding a link.
A minor problem is there is no AppleScript command to delete email attachments, but there is a workaround with GUI scripting