Unable to connect to SMTP server

I am unable to connect to my SMTP server. The code throws:

The following SMTP error was encountered: 110 Connection timed out

I am using CodeIgniter framework. Here is the config:

$config[‘protocol’] = ‘smtp’;
$config[‘smtp_host’] = ‘smtp.ilmos.in’;
$config[‘smtp_user’] = ‘xxxxxxx’;
$config[‘smtp_pass’] = ‘xxxxxx’;
$config[‘smtp_port’] = 25;
$config[‘charset’] = ‘iso-8859-1’;
$config[‘wordwrap’] = TRUE;
$config[‘mailtype’] = ‘html’;

The code works fine on localhost (on my laptop) and I am able to send mail. I have tested with PHPMailer as well. I get the same error. Are outgoing SMTP connections blocked?

naf | ilmos.in

Yes, port 25 is blocked on our hosting. Port 25 is also used for direct SMTP delivery, which is not something we allow from our servers.

We do allow SMTP connections over port 587 and 465, which are also supported by most SMTP servers. Please check with your email provider to see which of those ports are available.

2 Likes

Oh, ok. 587 worked for me. Thank you so much. :blush:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.