Had tried to make php mail() work on localhost. But had failed. So gave up. This was around 8 months back. Now again some days back had to use the Php mail function on one project. This time I had the liberty to test my code on an external web server, but i tried again to make it work on my localhost.