Help! Applescript to import and redirect email


I am thinking of shredding my Archive emails of any attachements. For this, I need an applescript, than can do the following in the

  1. File the selected message to DTPO
  2. Redirect the message via the predefined email address, after a) Inserting the DTPO link in the message and b) strip the attachements from the message.

If this script can work for batch selection, that would be great :smiley:


I.e., Store the original message + attachments in DEVONthink. Then, delete the archives (in your Library, I assume) and replace them with a version of the messages** that have only the body of the message, no attachments, and a link back to the stored message in DEVONthink?

Is that correct?

Why not just archive everything in DEVONthink, delete your originals from their mail files, and leave it at that?

The script could be written – though it is moderately complex, and I don’t imagine most readers would have a use for it, and it would require a fair amount of testing to make sure there’s no strange edge cases that would wreck the process.

[size=85](**this version would be created by stripping out the message body, appending to that a link to the full message + attachment in DEVONthink, and sending this back out as a new email to some unspecified forwarding address.)[/size]

Somewhat. I don’t want to strip anything from the message, except attachement/s.

Can’t let go my preferred email client MailMate :smiley: It has some amazing search capabilities, particularly suited for my email needs.

Please help if you can :slight_smile:
Meanwhile, I am trying to achieve it through a Keyboard Maestro macro. But, I need the link of the latest added email without going to DTPO. Is it possible?
I have asked this query in a separate topic here.

Apple Mail has a feature to delete attachments from messages. (See this note.) Does MailMate access the same IMAP folders on your machine as Mail? If so, then maybe deleting the attachments in Mail is an option.

I am using for the same purpose. What it does is, it redirects the message after removing the attachments. But, I need to insert DTPO link in the redirected email.