I'm using gmail smtp to send e-mail via laravel 5.1 for reset password. Il works in my local service.
However I get this error when I test online:
Swift_TransportException in StreamBuffer.php line 270:
Connection could not be established with host smtp.gmail.com
[php_network_getaddresses: getaddrinfo failed: Name or service not known #0]
There are configuration for .env :
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=testnnom@gmail.com
MAIL_PASSWORD=test
MAIL_ENCRYPTION=tls
and for mail.php
'driver' => env('MAIL_DRIVER', 'smtp'),
'host' => env('MAIL_HOST', 'smtp.gmail.oom'),
'port' => env('MAIL_PORT', 587),
'from' => ['address' => 'testnnom@gmail.com', 'name' => 'Outil Perf'],
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'sendmail' => '/usr/sbin/sendmail -bs',
'pretend' => env('MAIL_PRETEND', false),
I found some similar question and tried to solve it, but didn't work.
for exampe : I've changed tls to ssl and the mail_port from 587 to 465. And I've changed the driver to sendmail. Also I've tried to Hacking core code with
$options['ssl']['verify_peer'] = FALSE;
$options['ssl']['verify_peer_name'] = FALSE;
I can't see other solution, so need your help. Thanks
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2wq3yUZ
via IFTTT
Aucun commentaire:
Enregistrer un commentaire