Shell script to send mail to an external mail id

February 10, 2012 at 03:36:58
Specs: CentOS
Whenever I try to send an email to my official mail id or my yahoo or gmail id using the mail command in Unix, I'm not able to do it.

However, it seems to work fine when I send an email to any other local address on the localhost using the same command.

The command I'm using is something like this.
mail -s 'Subject' myname@mycompany.com < inputfile.txt

Is there any alternate command to send emails to an external mail id, or is there any way of doing it using the mail command itself?

Please enlighten me !


See More: Shell script to send mail to an external mail id

Report •

#1
February 10, 2012 at 09:30:26
You need a mail transport agent. This is not really my area, but sendmail is, by far, the most widely used.

goggle "linux" "sendmail" and you'll see thousands of links. This link is helpful:

http://www.linuxhomenetworking.com/...


Report •
Related Solutions


Ask Question