'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'useFileTransport' => false,
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.yandex.ru',
'username' => 'username',
'password' => 'password',
'port' => 465,
'encryption' => 'ssl',
],
],
\Yii::$container->set(\Yii::$app->mailer, [
'class' => 'yii\swiftmailer\Mailer',
'useFileTransport' => false,
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.yandex.ru',
'username' => 'username',
'password' => 'password',
'port' => 465,
'encryption' => 'ssl',
]);
Yii::$container->set('mailer', [
'class' => 'yii\swiftmailer\Mailer',
'useFileTransport' => false,
'transport' =>
[
'class' => 'Swift_SmtpTransport',
'host' => $smtp_host,
'username' => $smtp_login,
'password' => $smtp_password,
'port' => $smtp_port,
'encryption' => 'ssl',
],
]);