Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

zaster's avatar

DigitalOcean Gmail Setting

I am using Digital Ocean

.env file

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=gmailpassword
MAIL_ENCRYPTION=tls

ran the following commands after this

php artisan config:cache
php artisan cache:clear
sudo service nginx restart

was able to make this work in the local environment. But in the production environment i am getting this error

Connection could not be established with host smtp.gmail.com [Connection timed out #110]
0 likes
2 replies
zaster's avatar

Already opened a ticket with Digital Ocean and problem solved. Emails are working now :) Thank you for your suggestion @haganjones.

1 like

Please or to participate in this conversation.