我不明白错误是什么,发送邮件时,使用 3 个可能的身份验证器在 SMTP 服务器上使用用户名“rpk54@yandex.ru”进行身份验证失败
如果我将它发送到一个文件,那么一切都好(测试)
从本地主机发送
编码
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
// send all mails to a file by default. You have to set
// 'useFileTransport' to false and configure a transport
// for the mailer to send real emails.
'useFileTransport' => false,
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.yandex.ru',
'username' => 'rpk54@yandex.ru',
'password' => 'пароль',
'port' => '465',
'encryption' => 'ssl'
]
],
发现问题
Yandex 不接受第三方应用程序的常规邮件密码。您必须为应用程序创建一个单独的密码。登录到网络界面。设置->安全->启用并创建应用密码。