The connection could not be established with the host smtp

     

Today, we will solve a Connection that could not be established with the host smtp.gmail.com in the Laravel application. I’m trying lớn send an email from gmail using Laravel from the local host. But getting below error Connection could not be established with host smtp.gmail.com ?.

Bạn đang xem: The connection could not be established with the host smtp

Error like:

The connection could not be established with the host smtp.gmail.com.Laravel mail error best solutions for established with host smtp.gmail.com.The connection could not be established with host smtp.gmail.com

.env file

localhost serverMAIL_DRIVER=smtpMAIL_HOST=smtp.gmail.comMAIL_PORT=587MAIL_USERNAME=example
domain.com"MAIL_FROM_NAME="$APP_NAME"Live serverMAIL_DRIVER=sendmailMAIL_HOST=smtp.gmail.comMAIL_PORT=587MAIL_USERNAME=example
domain.com"MAIL_FROM_NAME="$APP_NAME"And also replace MAIL_MAILER=sendmail in mail.php file.

Xem thêm: Người Có Tên Dài Nhất Thế Giới, Cô Gái Có Tên Chứa 1

#config/mail.php#old code"default" => env("MAIL_MAILER", "smtp"),#new code"default" => env("MAIL_MAILER", "sendmail"),

*
The connection could not be established with the host SMTP tin nhắn com mail
*

*

Leave a Reply Cancel reply

Your e-mail address will not be published. Required fields are marked *

Save my name, email, and website in this browser for the next time I comment.

Δ


*

*

jdomain.vn provides a collection of tutorials about PHP, Laravel, WordPress, Django, MySQL, Bootstrap, Jquery, Ajax, APIs, CRUD operations, etc.


This trang web uses cookies to lớn improve your experience. We"ll assume you"re ok with this, but you can opt-out if you wish. Cookie settingsACCEPT

Chuyên mục: Domain Hosting