Send mail with sendmail

Date: Wed, Jan 28, 2015

A howto on sending email via the linux sendmail command


#!/bin/bash

SENDMAIL=/usr/sbin/sendmail
RECIPIENT=tosomeone@example.com
FROM=me@example.com

cat <<EOF | $SENDMAIL -t ${RECIPIENT}
From: ${FROM} 
To: ${RECIPIENT}
Subject: testmail

some test text as body of the email.
EOF