How can I solve Connection could not be established with host smtp.gmail.com ?
- Divya Verma
- 05-Jun-2020
- 1
100% Working Solution for Laravel mail error ~ How can I solve Connection could not be established with host smtp.gmail.com
Error: Connection could not be established with host smtp.gmail.com [Connection refused #111]
Use localhost: ----------------------------
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=secret@gmail.com
MAIL_PASSWORD=secret
MAIL_ENCRYPTION=tls
Use server: ---------------------------
MAIL_DRIVER=sendmail
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=secret@gmail.com
MAIL_PASSWORD=secret
MAIL_ENCRYPTION=tls
=============================================
Always remember MAIL_DRIVER=smtp work for localhost but in case of Server you have make change MAIL_DRIVER=sendmail
Thanks for Visit us
15043 1
8
(1) Comments
Belal
Thanks a lot!