I am trying to send email using gmail smtp in my laravel application which was working fine yesterday and emails were sending but today it is giving me this error. I tried every possible way but haven't figure out what is the problem. Any help would be appreciated. Thank you.
Here is my .env setting for smtp server
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=myemail
MAIL_PASSWORD=mypassword
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=myemail
MAIL_FROM_NAME="${APP_NAME}"
I tried by changing
MAIL_PORT= 465
MAIL_ENCRYPTION = ssl
I also changed
MAIL_MAILER = sendmail
Still it is giving me the same error. I also allow access to unsecured apps from google but the error didn't go.