Sending a message from the Unix command line using mail TO_ADDR results in an email from $USER@$HOSTNAME. Is there a way to change the \"From:\" ad
mail TO_ADDR
$USER@$HOSTNAME
On CentOS this worked for me:
echo "email body" | mail -s "Subject here" -r from_email_address email_address_to