Getting: Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in ....?
Use ini_set("SMTP", "mail.yourdomain.com" ); before you send the email with the mail() function.
That is it!.
Just make sure you setup the from and reply to fields to be valid for your domain otherwise you might get different errors.