Send email from shell

#!/bin/sh
### Parameters ###
logfile="/tmp/smart_report.tmp"
email="example@example.com"
subject="Test-Mail"
### Set email headers ###
(
echo "To: ${email}"
echo "Subject: ${subject}"
echo "Content-Type: text/plain"
echo "MIME-Version: 1.0"
echo -e "\r\n"
) > ${logfile}
(
echo "body"
) >> ${logfile}
### Send report ###
sendmail -t < ${logfile}
rm ${logfile}

{% auto_image_include %}