I have search for ages trying to find out how to do this:
How can I send email from the command line and specify the sender address on a box with Debian 7.8 and Exim4?
This does not work:
mail -s "Subject of the Email" [email protected] -- -f [email protected]
Neither does this:
mail -s "Subject of the Email" -r [email protected] [email protected]
update-alternatives --display mailx
update-alternatives --display mailx mailx - auto modus lenke peker for øyeblikket til /usr/bin/bsd-mailx /usr/bin/bsd-mailx - prioritet 50 slave Mail: /usr/bin/bsd-mailx slave Mail.1.gz: /usr/share/man/man1/bsd-mailx.1.gz slave mail: /usr/bin/bsd-mailx slave mail.1.gz: /usr/share/man/man1/bsd-mailx.1.gz slave mailx.1.gz: /usr/share/man/man1/bsd-mailx.1.gz Nåværende «beste» versjon er «/usr/bin/bsd-mailx»
sendmail -t <msg
command, wheremsg
contains the "To:", "From:", "Subject:" headers, an empty line, and the message text.