as the title says, when I'm trying to send a mail with Laravel 5 and with a shared host in GoDaddy I get the following error.
Swift_TransportException in StreamBuffer.php line 265:
Connection could not be established with host >localhost [php_network_getaddresses:
getaddrinfo failed: Name or service not known #0]
This is the configuration that I'm using:
'driver' => 'smtp',
'host' => 'localhost',
'port' => 587,
'from' => array('address' => 'mail@domain.com', 'name' => 'name'),
'encryption' => 'tls',
'username' => 'cpanel user name',
'password' => 'cpanel password',
'sendmail' => '/usr/lib/sendmail -t',
'pretend' => false,
As the support guy from GoDaddy told me, I use the host as "localhost" instead my domain name but still getting the exception.
Can anyone give me a hand with the correct configuration please?
I had the same issue when I was using Godaddy web hosting and solved this by editing my .env file as,
Where MAIL_HOST is your domain name from Godaddy, MAIL_USERNAME is your user name from Godaddy and MAIL_PASSWORD is your password from Godaddy.
I hope this may help you.