PHP form mail problems

I am just starting to use PHP and I thought I would take the tutorial on this site about PHP form mail. When I tested the script, I got the following error:
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 **http://localhost/tests/mailer.php** on line 29”. I was wondering if anyone would be able to help me with my situation. Thanks.