08 January,2019 by Rambler
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 "[email protected]" -s "Test Email with attachment" -S smtp="smtp-xxxx.xxxx.xxxx.net" -a/tmp/hi_jack.txt "[email protected]" --sending an email to an external smtp server with multiple recipients mail -v -r "[email protected]" -s "Test Email with attachment" -S smtp="smtp-xxxx.xxxx.xxxx.net" -a/tmp/hi_jack.txt "[email protected],[email protected]" --sending an email to an external smtp with message written to body echo "Hi Jack" | mail -v -r "[email protected]" -s "Test Email without attachment" -S smtp="smtp-xxxx.xxxx.xxxx.net" "[email protected]"
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |