Newer
Older
Import / code / Scripts / automailer.txt
@John John on 29 Dec 2020 499 bytes bulk import from macbookpro checkouts
Howto do auto-mailing
---------------------

make file like this:

/root/automailer/weekly.sh

#!/bin/bash

TO_ADDRESS=list@domain.com
FROM_ADDRESS=sender@blah.com

/usr/bin/mail $TO_ADDRESS << EOF
~s Auto-generated reminder
~R $FROM_ADDRESS

Hi Guys,

Message

--
Regards
Sender

EOF

Then edit your crontab with:

crontab -e

An editor should appear, for weekly running of the script on fridays, do something like this:

0 0 * * 5       /bin/sh /root/automailer/weekly.sh

And there you have it