0
votes

I have a laravel application hosted on heroku using sendgrid add-on for smtp functionality. Within my app I have a register form which sends a email notification once a user has registered but I get these error everytime I try registering:

(1/1) Swift_TransportException Connection could not be established with host smtp.sendgrid.net :stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known

I have triple checked my config settings for mail, the settings for mail smtp I use are:

MAIL_DRIVER=smtp
MAIL_HOST=smtp.sendgrid.net
MAIL_PORT=587
MAIL_USERNAME=secret
MAIL_PASSWORD=secret
MAIL_ENCRYPTION=tls

I have added these to Heroku's var information and still no luck.

1

1 Answers

0
votes

Try to change

MAIL_DRIVER=smtp

to

MAIL_DRIVER=sendmail