I'm trying to send emails from Laravel app that I have in production, but it's not working. It gives me this error:
Connection could not be established with host smtp.googlemail.com :stream_socket_client(): unable to connect to ssl://smtp.googlemail.com:465 (Connection timed out)
But when I try to send email from localhost it works correctly.
my config mail
- MAIL_DRIVER=smtp
- MAIL_HOST=smtp.googlemail.com
- MAIL_PORT=465
- MAIL_USERNAME=*********
- MAIL_PASSWORD=**********
- MAIL_ENCRYPTION=ssl
also email is less secure:on