Let's examine the error messages:
connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini
PHP is attempting to connect to an email server on localhost (connect to mailserver at "localhost") using the standard email port (port 25).
So let me ask this: are you running an email server on your PC? I suspect that the answer is no.
The error message then gives you a hint as to what to do (verify your "SMTP" and "smtp_port" setting in php.ini).
So here is what you need to do. Find out, from your email provider, what their SMTP host name is and what port they use and then update your php.ini file to reflect that information. Since you are sending email to a yahoo address, I will assume that you are using yahoo as the email server. A search for
yahoo smtp configuration yielded several results, such as this one:
http://answers.yahoo.com/question/index?qid=20080814033844AA3xxOp
If you need more help, tell me which email provider you use.
You should also look for the php.ini file (if you run the info.php file I suggested on your other post it will tell you where php.ini is located on your PC)