Applescript to automatically delete certain attachments after sent in Mail
Because of my work I often need to send the same attachment to dozens of customers every day, who request basically the same information. I mean, the exact same PDF file (which changes periodically) to everyone. Typically a 2 MB file. Now, this doesn't sound too bad, but when you have to respond literally to thousands of customer inquiries every year, it really adds up and eats space, which really becomes an issue for me when I have to backup...
Now, I would love to be able to setup a rule to automatically remove a specific attachment (or at least all attachments in a message) after the message is sent, IF the attachment name is such and such...
Something like this:
1. After a message has been sent...
2. Check attachment name...
3. If attachment name matches "SomeFile.pdf" (or if attachment name is included in some kind of list)
4. Then: remove attachment
I got a nifty add-on called "Mail Act-On", which lets you add rules for sent messages in Apple Mail. It lets you set the attachment name as a condition, but there's no build-in action to remove attachments. However it offers you the option to run an AppleScript if the condition was met.
I hope my question is not too idiot 🙂 Thanks in advance for your help!!
Mac OS X (10.6.5)