Unable to use sendmail utility in UNIX environment
Hi All,
This is in relation to the usage of sendmail utility in UNIX environment. Any help would be highly appreciated. The issue is as follows : In order to use the sendmail utility, I created a text file as xxx.txt with the following entries: From:abc@abc.com To:to@to.com Subject:This is the subject Then from the command line I ran the following command : /usr/lib/sendmail -t -i << EOM Then something like > came as a return where I wrote `cat xxx.txt` Then again something as > appeared where I put EOM and then the command prompt retuned back. However, I failed to receive any mail. Could anyone kindly correct me, if I am wrong somewhere ? Thanks a lot in advance, |
This isn't really a problem with sendmail but with your understanding of the shell's heredoc syntax. you should probably read up a little on that.
A hint: any sendmail compatible MTA expects the WHOLE mail on stdin when called the way you do it. So you could do something like that: Code:
# cat - | sendmail -t -i |
All times are GMT -5. The time now is 02:31 AM. |