How to write a shell script to send an email to an id

Hi all,

I want to know how to send an email using shell script .....
I tried a command call mail but it did not work..
Please any one reply.. With example if you know thanks..

Madhu

Can you please explain how did u try that?

$ mailx -s Desktop/images.jpg madhumathikv@gmail.com

[madhumathi@localhost ~]$ /home/madhumathi/dead.letter... Saved message in /home/madhumathi/dead.letter

It will not go further from here..
please help.. i need urgently...

Madhu

mailx -s subject madhumathikv@gmail.com <<EOM
this should be sent
EOM

Hi! Porter,
Basically I need to check everyday current server log file if anything �error� message on it? If answer yes I like to receive auto email. Please let me know how to write shell script for this auto alert email.

Thanks and regards