TECHIES WORLD

For Techs.... Techniques.... Technologies....

BashLinux

How to specify the from email in mailx command

Mailx command provides the option to specify the from email as argument.

#echo "MESSAGE" | mailx -s "SUBJECT" -r SENDER RECEIVER

Where MESSAGE need to be replaced with the email body, SUBJECT with the email subject, SENDER with the sender email id and RECEIVER with the recipient email id.

That's all…