'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' => $params['smtp_host'],
                'port' => $params['smtp_port'],
                'encryption' => $params['smtp_encryption'],
                'username' => $params['username'],
                'password' => $params['password']
            ]
        ],