Question: How can I use an external smtp server with Linux mail ? I'm using the heirloom-mailx implementation on RHEL. Answer: Here are some examples of using an external smtp server, using the heirloom package on RHEL. --sending an email to an external smtp server - with an attachment mail -v -r "root@myserver.net" -s "Test Email with attachment" -S smtp="smtp-xxxx.xxxx.xxxx.net" -a/tmp/hi_jack.txt "jack@xxxxxx.com" --sending an email to an external smtp server with multiple recipients mail -v -r "root@mysever.net" -s "Test Email with attachment" -S smtp="smtp-xxxx.xxxx.xxxx.net" -a/tmp/hi_jack.txt "jack@xxxx.com,kevin@xxxx.com" --sending an email to an external smtp with message written to body echo "Hi...
Read more →