How To - Sending Emails w/ Shell

1) Add this to your node_bootstrap file:

yum -y install sendmail
yum -y install mail
service sendmail restart

2) Example Shell Command:

echo "email content" | mail -v -s "Email Subject" -a
/path/to/any/attachments.txt user@domain.com
 
Have more questions? Submit a request

Comments

  • Avatar
    stephen.renault

    This example failed for me. I had to enter . on a line by iteself and no email arrived. I could use aws ses send-email and send-raw-email This did not work for me.

Powered by Zendesk