Shell script for sending automatic email to personal mail id

hi guys,

I need a shell script to send mail automatically to my personal mail id like xxxx@hotmail.com but while experimenting with "mail" command I faced following problems.

 cat text1.txt | mail -s 'test mail' xxxx@hotmail.com
 command successfully executed

but while
checking for the status with mailq -Ac it poped up something like this

o0I9JG55016211       95 Mon Jan 18 14:49 tms6
                 (host map: lookup (hotmail.com): deferred)
                                         xxxx@hotmail.com

anybody knows anything about that

plz help !!!!!!!!!!!!!!!!

Try this

mailx -s "test mail" xxxx@hotmail.com < text1.txt

That has nothing to do with how the mail text will be handed over to mail. Seems your mail transfer agent (MTA) is not set up properly (postfix? sendmail? ...?). Make sure you can send mails outside - the command for sending mail seems to have no errors in it.

Plz help how to check/configure MTA..........

Lookup sendmail or postfix configuration in google.

Most linux have sendmail installed by default. I believe you will need a domain in order for it to send out properly or a server to relay for you.