Вот так прописано в web.php:
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.yandex.ru',
'username' => '****@yandex.ru',
'password' => '***',
'port' => '465',
'encryption' => 'ssl',
],
],
Так в params.php:
return [
'adminEmail' => '****@yandex.ru',
];
Выдаёт такую ошибку, хотя данные введены верно:
Swift_TransportException
Failed to authenticate on SMTP server with username "kirill.romantik@yandex.ru" using 3 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535 5.7.8 Error: authentication failed: Invalid user or password!
". Authenticator PLAIN returned Expected response code 235 but got code "535", with message "535 5.7.8 Error: authentication failed: Invalid user or password!
". Authenticator XOAUTH2 returned Expected response code 235 but got code "535", with message "535 5.7.8 Error: authentication failed: Invalid user or password!
".