Yii2 Setting up email

<note>This is based on Yii2 Advanced Application template.</note>

In file common/config/main-local.php set 'useFileTransport' ⇒ false from the default of true

Update common/config/main-local.php to include

        '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,
            'transport' => [
                'class' => 'Swift_SmtpTransport',
                'host' => '192.168.1.20',
                //'username' => 'user@domain.fr',
                //'password' => '*******',
                'port' => '25',
               // 'encryption' => 'tls',
            ],
        ],

Table of Contents
QR Code
QR Code tech:yii2:mail_setup (generated for current page)