Component for sending messages via yii2-tasks
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist asmoday74/yii2-mailer-task "*"
or add
"asmoday74/yii2-mailer-task": "*"
to the require section of your composer.json file.
As soon as the extension is installed, indicate in the settings of the Mailer component the path to it:
'components' => [
'mailer' => [
'class' => \asmoday74\mailertask\Mailer::class,
'viewPath' => '@common/mail', //or @app/mail for basic template yii2
'useFileTransport' => false,
'transport' => [
'scheme' => 'smtps',
'host' => 'your smtp server',
'username' => 'your login',
'password' => 'your password',
'port' => '465',
'encryption' => 'ssl',
],
],
...
]Do not forget to configure TASKS launch according to your preferences.