I have a folder filled with pdfs, I need to email each pdf separately to a specific email address. After they are emailed, they can be moved to a separate folder.
So I would like a script that starts with the first pdf, emails it to a specific address, then moves it to another folder, then goes to the next pdf, and so forth and so on.
MailMate has would make this super-simple to automate.
Checkout this page for details on how you can use it from the command line, or look at the emate command, which seeks to make it even easier.
echo "The body of the message.” |\
emate mailto --send-now --to "Info <info@example.com>" ~/Desktop/file.txt
Then it would simply be a matter of pairing the files and the email addresses in some way that you can loop through, send them using emate and then mv them wherever you want to go when you’re done.
Not sure how this helps and scripting is beyond my means, again all I want to do is
email pdf files found in a certain folder - they need to be emailed one at a time and then either "marked" as sent or preferably moved to another folder.
The email address is the same for all files to be sent, but again, they need to be sent one at a time
@Scott_Simons, thanks for answering all my questions. That really helps clear things up.
Since you're using Apple Mail, I going to wait to see if one of the AM gurus will answer your question. If not, then I'll give it a shot (I have AM, but rarely use it.).
Meanwhile, you can review the KM Wiki to see if it will help get you started:
Unfortunately, way beyond my skill set - here is what I did so far, it did attach the selected attachment, although it did not send it, only attached to the email
But no looping for the next attachment to be emailed, nor moving to another folder
You had all of the right parts, just not in the right order.
This works for me.
Your need to change the paths for the Receipts and ReceiptsPosted folders.
MACRO: Email Receipt
**Requires: KM 8.2.4+ macOS 10.11 (El Capitan)+**
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))
#### DOWNLOAD Macro File:
<a class="attachment" href="/uploads/default/original/3X/f/e/febc6a18a6a2fec810ec6c5644d1d979b7c4acc3.kmmacros">Email Receipt.kmmacros</a>
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**
---
<img src="/uploads/default/original/3X/0/0/0086bdebd0ace8fca8c4eeca79e1bfabb10ea9b1.png" width="549" height="996">
I think it might have worked, looped thru all, and moved to the other folder, will find out if the web app accepts this many, if not, what do I need to insert to "pause' for 5mins - thru 1hr