The Linux / Unix command line has a command called “mail”. The problem with mail is that all the emails will come from root@localhost or whatever user you are using to run the “mail” command.
In order to override the from email, you must invoke the “sendmail options, which is done by doing a double dash (–) and then the -f command like so
That’s all there is to it, the -f is the sendmail option for “From” which will get set when the email goes out
Refer to the mail and the sendmail man pages for more info