Swiftmailer not sending

Yii 2 Advance App template

I am trying to send mail in an API Action


   'mailer' => [

            'class' => 'yii\swiftmailer\Mailer',

            'useFileTransport' => 'false',

            'viewPath' => "@common/mail",

            'transport' => [

                'class' => 'Swift_SmtpTransport',

                'host' => 'host',

                'username' => 'name',

                'password' => '***',

                'port' => '25',

                'encryption' => 'TLS'




Yii::$app->mailer->compose('layouts/html', ['content' => 'something'])

  ->setFrom([Yii::$app->params['adminEmail'] => 'Test Mail'])


  ->setSubject('This is a test mail ')


View path is correct, checked and confirmed.

the send() returns 1 which is TRUE, as in sending success but no email was received in two different receiver I have tried (spam/junk checked)

Any help will be appreciated!

Try [font=“Courier New”]‘useFileTransport’ => false[/font] instead of [font=“Courier New”]‘false’[/font].

Thank you, I didn’t realized about that.