Отправка почты Ларавел locallhost

env:

MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=pass
MAIL_ENCRYPTION=tls

Controller

public function htmlEmail(){
        $data = array('name'=>"Virat Gandhi");
        Mail::send('mail', $data, function($message) {
            $message->to('[email protected]', 'Tutorials Point')->subject
            ('Laravel HTML Testing Mail');
            $message->from('[email protected]','Virat Gandhi');
        });
        echo "HTML Email Sent. Check your inbox.";
    }

Получаю ошибку:

Failed to authenticate on SMTP server with username "[email protected]" using 3 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code "534", with message "534-5.7.9 Application-specific password required. Learn more at
 534 5.7.9 

Прошу помогите... я не знаю что делаю не так...

Двухэтапную авторизацию подключил


Ответы (1 шт):

Автор решения: Narek

Двухэтапную аутентификацию нужно отключить и включить Less secure app access в настройках google аккаунта.

→ Ссылка