MBF Knowledge Base

I'm using PHPMailer on my WAMP server. When I try to send a message with my script using a gmail account with SSL, I get the following errors:

SMTP -> ERROR: Failed to connect to server: A connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because connected host has failed to respond.

SMTP Error: Could not connect to SMTP host.

How can I fix this?

There are a few reasons why this can happen:

1.) Lack of SSL support in PHP. You must enable it. To enable SSL in PHP you need to uncomment the following directive in the php.ini file: extension=php_openssl.dll.

2.) A firewall may be blocking you from connecting to outbound sockets. You can check that using PHP.

3.) Make sure you have SSL enabled in your WAMP configuration file.