Quando provo ad usare GMail SMTP per l'invio di e-mail via laravel, ho incontrato il seguente errore:Utilizzando SMTP di Gmail via laravel: connessione non può essere stabilita con l'host smtp.gmail.com [Connessione scaduta # 110]
Swift_TransportException
Connection could not be established with host smtp.gmail.com [Connection timed out #110]
e 'la traccia dell'errore:
...
}
$this->_stream = @stream_socket_client($host.':'.$this->_params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, stream_context_create($options));
if (false === $this->_stream) {
throw new Swift_TransportException(
'Connection could not be established with host ' . $this->_params['host'] .
' [' . $errstr . ' #' . $errno . ']'...
e qui ci sono la mia configurazione per la posta:
'driver' => 'smtp',
'host' => 'smtp.gmail.com',
'port' => 587,
'from' => array('address' => '[email protected]', 'name' => 'some'),
'encryption' => 'tls',
'username' => '[email protected]',
'password' => 'mypassword',
'sendmail' => '/usr/sbin/sendmail -bs',
'pretend' => false
Uso un host condiviso e la porta 587 su localhost è aperta.
E hai usato smtp di gmail? allora penso che il driver dovrebbe essere smtp, no? – Ahmad
Procedere, ma la ** email ** non viene inviata. – ihue
Dove trovo queste configurazioni? – mr5