Failed to authenticate on SMTP server error using gmail

后端 未结 8 572
鱼传尺愫
鱼传尺愫 2020-12-23 09:34

I\'m trying to set up email for my first laravel project, and was thrilled that there\'s a laracast for it: https://laracasts.com/lessons/mailers

I\'ve followed the

8条回答
  •  离开以前
    2020-12-23 10:21

    Change the .env file as follow

    MAIL_DRIVER=smtp
    MAIL_HOST=smtp.googlemail.com
    MAIL_PORT=587
    MAIL_USERNAME=email_address@gmail.com
    MAIL_PASSWORD=password
    MAIL_ENCRYPTION=tls
    

    And the go to the gmail security section ->Allow Less secure app access

    Then run

    php artisan config:clear
    

    Refresh the site

提交回复
热议问题