Page 1 of 1

Cannot Connect

Posted: Fri Jan 26, 2007 8:04 pm
by ksorbo
Really looking forward to using Swiftmailer, but I cannot get connected to my SMTP server. I have read most of the threads about this problem. When I couldn't create a swift object I tried the following function:

Code: Select all

function testsock() {
		$sock  = fsockopen("mail.myserversname.com", 25, $errno, $errstr, 10);
		var_dump($sock);
		echo "<br />Error number: $errno";
		echo "<br />Error message: $errstr";	
	}
This results in the following:

Code: Select all

A PHP Error was encountered

Severity: Warning

Message: fsockopen() [function.fsockopen]: unable to connect to mail.myserversname.com:25

Filename: controllers/contacts.php

Line Number: 23

bool(false)
Error number: 111
Error message: Connection refused
I know my server uses pop login authentication. I am able to send mail regularly with all my email clients

Any suggestions?

Keith

Posted: Wed Jan 31, 2007 6:52 am
by Chris Corbyn
Ask your host ;) Either your host are blocking the outgoing connection or the remote server is rfusing your connection. As you can see from your test, it's not related to Swift, it's a server config issue.