0

I always get this error since today:

Swift_TransportException Connection could not be established with host smtp.gmail.com :stream_socket_client(): unable to connect to tcp://smtp.gmail.com:587 (Connection timed out)

This was still working yesterday.

I tried the solutions here in StackOverflow and I have the similar .env settings as the solutions here.

Here's my .env settings:

MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=myemail@gmail.com
MAIL_PASSWORD=mypassword
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=myemail@gmail.com
MAIL_FROM_NAME="${APP_NAME}"

My Less secure app access is turned on too.

I tried sendmail as the mailer too but it produced a different error. Tried another gmail account but still the same error.

Could it be that this a google problem?

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
  • Google is disabling [less secure apps](https://support.google.com/accounts/answer/6010255?hl=en) you should not be using a login and password. you should switch to Xoauth2 – Linda Lawton - DaImTo Apr 27 '22 at 08:16
  • @DaImTo I'm not sure how to switch Xoauth2 with gmail. Also, I already looked into that link already. – cookeemonster27 Apr 27 '22 at 08:49
  • I suggest you go and look at Xoauth2. Less secure apps is going to be shut down in less then a month and for some cases its already being removed as you can see now. – Linda Lawton - DaImTo Apr 27 '22 at 08:58

0 Answers0