Can't send email from Laravel platform. Tried with different another emails (gmail, mailgun) and they work properly but it seems that can't make it work with the one our customer wants to use:
MAIL_DRIVER=smtp
MAIL_HOST=xxx.xxx.xx
MAIL_PORT=25
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
We got this error:
Swift_TransportException: Connection could not be established with host [php_network_getaddresses: getaddrinfo failed: Name or service not known #0] in .../vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:269
I can connect with telnet from the server so it apparently everything's ok. But I find very weird this configuration. Do I need to check something else in Laravel to make it work?
EDIT 1:
Tried with this configuration too:
MAIL_DRIVER=smtp
MAIL_HOST=xxx.xxx.xx
MAIL_PORT=587
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=TLS
Keep getting the same error,tho
Uhm, for some reason (I don't really know why) .env file does not apply changes even with config:clear or config:cache...so everytime I changed something there I always get the same error.
The only solution was to do a sudo reboot and then it gets the new configuration.