Failed to connect to ssl://smtp.gmail.com:587 [SMTP: Failed to connect socket: stream_socket_client(): unable to connect to ssl://smtp.gmail.com:587 (Unknown error) (code: -1, response: )]
I am getting the above error when trying to connect to any SSL email server.
587/465 - I have tried the fixed:
from
$this->socket_options =$socket_options;
to
$this->socket_options = array('ssl' => array('verify_peer_name' => false));
However this did not resolve my issues.
I have also attempted using a different SMTP service but this also fails with the same issues.
If I try without the ssl in the settings it returns this error:
authentication failure [SMTP: STARTTLS failed (code: 220, response: 2.0.0 Ready to start TLS)]
This is my current server setting issues.
A telnet to port 465 and 587 works.