0

I am trying to send email in Laravel using Swift Mailer with markdown, i have been still trying from last 3 days but No Exact Solution found.

I have the .env file which is working properly in Local server. But, same env if I referred then I am getting above error.

I am not able to find what is wrong with my code.

Already Referred given solutions on google.

.env file:-

APP_NAME=Laravel
APP_ENV=local 
APP_KEY=xx 
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=xx
DB_DATABASE=xx
DB_USERNAME=xx
DB_PASSWORD=
BROADCAST_DRIVER=pusher
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=xxxxxxxxxxx
MAIL_PASSWORD=xxxxxxxx
MAIL_ENCRYPTION=tls
MAIL_ADDRESS=xxxxxxxxxxxx
Adriaan
  • 17,741
  • 7
  • 42
  • 75
shree
  • 7
  • 4

1 Answers1

0

You should create app password in google app password and use that password.

App password is a 16-digit passcode that gives an app or device permission to access your Google Account.If you use 2-Step-Verification and are seeing a “password incorrect” error when trying to access your Google Account, an App password may solve the problem. source

Dhruv Raval
  • 1,535
  • 1
  • 8
  • 15