How to send emails in a bash script
01 Feb 2010Simple example to send an email if $message is not null
SUBJECT="Automated Security Alert" 
TO="[email protected]" 
 
$message '' # if error or alert then create a message 
 
if [[ -n $message ]] 
then 
 echo $message 
 /bin/mail -s "$SUBJECT" "$TO"
