How to send email using shell script in UNIX, Is any environment setup required in Mac OS X ?

Hi All,
I am using Mac OS X (Leopard OS). I am very new to UNIX. My requirement is that, by running a shell script, I create a log file. So I have to send a mail having that log file attached. What I tried to do is, I simply tried to check,whether this direct command works or not. So I directly gave this command in the terminal

     mail -s "Hello" afreenkarim697@gmail.com

But it didn't work. It just hangs. So what should I do?

Please if anyone has any suggestion or solution, it is welcomed.

Thanks in Advance
Afreen

This is asked very often - please use the search function of the forum using search patterns like "mail attachment" or "mail attachment uuencode".

Also please use code tags when posting code, data or logs etc.

try this

mail -s "Hello" afreenkarim697@gmail.com < /dev/null