I keep getting this error when I try to send an e-mail in PHP:
Warning: mail() [function.mail]: Failed to connect to mailserver at \"localhost\" port 25, ver
If you are running your application just on localhost and it is not yet live, I believe it is very difficult to send mail using this.
Once you put your application online, I believe that this problem should be automatically solved. But i think ini_set() helps you to change the values in php.ini during run time.