When I try to use Gmail SMTP for sending email via Laravel, I encounter the following error:
Connection could not be established with host smtp.gmail.com :stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (Connection timed out)
It is the trace of the error
set_error_handler(function ($type, $msg) {
throw new Swift_TransportException('Connection could not be established with host '.$this->params['host'].' :'.$msg);
});
openssl
extension enabled? – RiggsFolly