I m new to bash scripting.
I have this command line to send an email with sstmp from the terminal:
{
echo To: user@gmail.com
echo From: user@gmail.com
echo Subject: "[Alert]"
echo 'McDonalds now offers vegan burgers and vegan ice cream!'
} | ssmtp user@gmail.com
I would like to execute this in a bash script. Can someone tell me how this is best done?
Thanks!