I came across this post when I Googled the same issue with no real results.
For me it was on my private server so I have full control.
Anyway, I had tried all mail connection types with nothing working with the same types of errors posted above
Could not connect to smtp host : 111 : Connection refused
<b>[phpBB Debug] PHP Notice</b>: in file <b>/includes/functions_messenger.php</b> on line <b>923</b>: <b>fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to localhost:25 (Connection refused)</b><br />
So I then tested to make sure fsockopen was available on the server and it was so that marked that off the issue list.
You can check this by simple making a test file say test.php
Code: Select all
echo "fsockopen exists and is avalible";
echo "fsockopen is not enabled";
Then upload and load the file in your browser.
Delete after the test.
So that lead me to checking the PHP configuration for errors, which there were some.
There were double instances of 2 modules and also an illegal comment using # which should be a ;
I'm not sure how this happened, but fixing them fixed the mail issue.
So for future reference if all else fails and you have access check the php.ini for errors