Menu
A+ A A-

Linux - Specify From Address With Mail Command

I struggled a bit with figuring out how to specify the from email address when sending mail on the Linux command line.  In short, you need to use the -r option.  For example:

echo "Enter your message here.  Thank you." | mail -s "Enter your subject here" -r This email address is being protected from spambots. You need JavaScript enabled to view it. This email address is being protected from spambots. You need JavaScript enabled to view it.

Post comment as a guest

0 Character restriction
Your text should be more than 10 characters
  • No comments found