How to send an email with attachment on Centos

I’ve been creating a load of bash scripts to call the Alfresco APIs that I’ve created for the electronic personal folders. I want to send success/fail emails to our monitoring systems but forgot how..

So here’s the code so I won’t forget..

So simple..

mail -a <path to file>/<file> -s "subject here" email@address.com <<< "message"

Leave a Reply

Your email address will not be published. Required fields are marked *