mail

Send mail from command line from specific email address

in

In an email, from is set in the header. To set FROM in any email sent through the mail command, here is the syntax

echo 'Mail body' | \
mail -s 'this is the email subject' -a 'From: sender@example.com' receiver@example.com
Syndicate content