# Sending email from the command line and specifying the from
Author: tip
Date: 2010-05-27 00:00:00
Tags: General, bash, linux, tips
The easiest way to send an email from a Linux command line is this:
mail -s subject me@here.com < /dev/null
Sometimes you need to specify the from address, but I'm always forgetting the syntax.
echo "The message" | mail -s "The subject" me@here.com -- -f sender@someplace.com
EOF