Laravel SwiftMailer : Expected response code 250 but got code “530”, with message "530-5.5.1 Authentication Required

前端 未结 6 1566
遇见更好的自我
遇见更好的自我 2020-12-06 20:42

I am using laravel 5.2, And the using Swift Mailer for password resetting. I have 2-step verification on my gmail..

As the google help says :

<
6条回答
  •  暖寄归人
    2020-12-06 21:05

    You can try following steps

    1. Turn on "less secure apps" for your account here.
    2. Try by setting your mail encryption to tls and port to 587 in your .env file
      MAIL_HOST=smtp.gmail.com
      MAIL_PORT=587
      MAIL_USERNAME=your-email@gmail.com
      MAIL_PASSWORD=your-password
      MAIL_ENCRYPTION=tls
    3. Then run php artisan cache:clear

    This worked just fine for me.

提交回复
热议问题