Если у вас в Yii2 не работает отправка писем одной из причин может служить параметр
'useFileTransport' => true,
достаточно его изменить на false.
В шаблоне advanced этот параметр меняется по адресу корневая/common/config/main-local.php. Файл после изменения должен выглядеть
примерно так
<?php
return [
'components' => [
...
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@common/mail',
// 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,
],
...
],
];

Добавить комментарий