I want to send email out to the Internet with command line (actually from a shell script). I just want to send a simple email with no more than 2 lines.
I tried something like
echo "XXX Message" |mail -s "XXX Subject" XxxUserName@XxxDomain.com
But my Linux server failed to deliver the email.
I know my syntax above is right as I have successfully sent an email with another Linux server.
System Config :
Red Hat Linux ver 8.0.
After combing the net for answers, I noticed that there are a few commands related to mails : mail, sendmail, qmail, etc etc.
Can anyone explain or point me to a tutorial that explains these different mail commands ? Differences ?
Why can't I send my email ? I know there could be quite a number of possible problems like network config not set properly... but can anyone give me a guideline on what/how to check ?
What does it take for the mail command to work ?
Thanks a lot.