sajith.. My question is where is you mailbox? On localhost? Or on a remote server?
It can happen that you are not able to send messages from servers that are not trusted or do not match the requirements of the receiving server. Eg: no domain set up, no MX record in DNS etc...
If it is not working on you local network than there is no chance to send mails to the outer world. Try to send a mail to yourself using telnet and SMTP. Use mail command in CLI and see what happens. If it works the next step might be making sure that your PHP is properly configured.
Sendmail is an awesome program but it is not that easy to configure. Did you use a package or did you compile the programs. Compiling the programs can grant you extra security but on mostly every system now you can use packages to install these programs that are preferred because you will find extra support for them.
You also might want to consider using a MTA that is less complicated to configure. Postfix is one of them. Actually this is a sendmail alternate and works perfect with PHP3-5. (^_^)
I love it.
I found a good link for you how to set it up and configure on archlinux but no worries. It will work almost the same way for Fedora and Ubuntu too.
PHP.ini is a critical config file. I don't know what should you do but I am sure that you need to make sure that these two lines are properly configured: