Good thought, speaking directly to the fact that the error he is seeing is saying failure to connect to mailserver localhost at port 25. That is the default in the php.ini, if smtp was manually enabled (by default sendmail is enable which according to other posts has been reported not to work on windows).
Now comes the confusing part, which php.ini should you fix because by default you may actually have three of them:
It has been said that one by who is more learned than me, that the one that you seek can be found by interrogating the apache httpd.conf file, but that is for you to determine for yourself. I have look but found nothing of help there.
What I have found best to work for me is to edit the one in the apache\bin directory. With that I take my leave of you, wishing a fair wind on your voyage to resolution...