Expected response code 250 but got code “530”, with message "530 5.7.1 Authentication required

前端 未结 7 1406
情深已故
情深已故 2020-12-24 01:29

I got stuck on this error I trying to configure SMTP mail on laravel

\"here

7条回答
  •  既然无缘
    2020-12-24 02:19

    I believe this has been answered in some sections already, just test with gmail for your "MAIL_HOST" instead and don't forget to clear cache. Setup like below: Firstly, you need to setup 2 step verification here google security. An App Password link will appear and you can get your App Password to insert into below "MAIL_PASSWORD". More info on getting App Password here

    MAIL_DRIVER=smtp
    MAIL_FROM_ADDRESS=noreply@domain.com
    MAIL_FROM_NAME=DomainName
    MAIL_HOST=smtp.gmail.com
    MAIL_PORT=587
    MAIL_USERNAME=YOUR_GMAIL@gmail.com
    MAIL_PASSWORD=YOUR_GMAIL_CREATED_APP_PASSWORD
    MAIL_ENCRYPTION=tls
    

    Clear cache with:

    php artisan config:cache
    

提交回复
热议问题