If you are wondering what we are talking about, click here to read the back story. Then come here and do it the easier way
So I took my own advice and tried to find a way to send mail from the command line. This way the mail.app doesn’t keep flicking to the forefront every few hundred seconds. That was getting old quickly. It turns out it wasn’t very difficult. From what I have read, different people may have a different experience due to their isp’s policies on sending mail and how google reacts, but I digress…
This one is simple!
It is two terminal scripts, a text file, and a loop in automator. DONE!
For starters fire up textedit and make a plaintext document. Name it “emailcontent.txt” and save it somewhere. If you want your email to have content, then type some in here.
Open up automator, go to utilities, drag the “run shell script” icon off to the right side of the screen, and paste in this code.
mail -s "email subject HERE" firstname.lastname@example.org, email@example.com, firstname.lastname@example.org < /Users/Path/To/Your/emailcontent.txt
In the code above change the emails to ones you want to send mail to, change the subject to the one you are filtering for, and change the path to where you saved your text file. If you want to find an easy way to get the path, simply drag the file into the terminal window.
Now drag in a new "run shell script" item from automator and paste in this code.
The number above is the interval at which it will send emails in seconds. Adjust to your needs.
Next drag over the "Loop" item and set it to "loop automatically" and stop after "999" times.
Save the workflow, and test it. It should loop and send emails. You might want to reduce the interval for testing purposes, but set them back once you are happy with it.
Finally, export it ("save as") as a .app and you are good to go. Double click it and you are off to the races!