I run a small company and recieve invoices by mail as pdf attachments. I use Mail. I want to be able to forward these mails with invoice attached to two prespecified email adresses and a few prespecified sentences in the body. I would have loved to just press a keyboard combination for the whole action to take place, instead of having to push "Forward", type in the addresses and body text and then push "Send".
I am new to Automator and AppleScript, have no coding experience, but I have tried different solutions including Automator, Rules within Mail and Applescript, but with no luck. Is there a way to do this task easy by simply using a keybord combination or a button in Mail?
Best Answer
I came up with a solution that I think may be a good option for you. This following AppleScript code is a folder action that will ultimately be attached to a folder of your choice (the folder in which you will download the PDF invoice that was sent to you in the email). Basically, the concept is, when you save the PDF invoice in your email to the specified folder, it will trigger the folder action which will take that PDF file and use it as an attachment to the new outgoing emails which will be sent to the email addresses that you set in the AppleScript code. In Script Editor.app, paste this following AppleScript code into a new document. Assuming your forward to email addresses will always be the same and the subject and body content text will also always be the same, you will only need to change the variable values for
forwardToRecipients
,theSubject
, andtheContent
one time only. Anyway once you change those values to your liking, save that AppleScript document as a .scpt file and name it something like “Forward Email Attachment.scpt”… to your /Users/YOUR_USERNAME/Library/Workflows/Applications/Folder Actions folder. Once it is saved to that location it will always be available to choose in your Folder Actions Setup dialogue. (which can easily be accessed by right clicking on any folder in Finder app then selecting Services/Folder Actions Setup…)After that is all set up and ready to go, all you need to do now is attach the folder action to the folder where are you will be downloading the PDF invoices from your emails to.