darkair / yii2-mailtank
Yii2 extension for Mailtank Client
Installs: 274
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=5.4.0
- darkair/yii2-console: master
- darkair/yii2-mailtank-client: master
- darkair/yii2-sentry-log: master
Requires (Dev)
- yiisoft/yii2: dev-master
This package is not auto-updated.
Last update: 2024-11-09 14:47:54 UTC
README
Yii2 Mailtank (mailtank.ru) extension
Installation
Install package
The preferred way to install this extension is through composer.
Either run
$ php composer.phar require darkair/yii2-mailtank "dev-master"
or add
"darkair/yii2-mailtank": "dev-master"
to the require
section of your composer.json
file.
Migration
You have to copy migrations to your 'migrations' directory cp vendor/darkair/yii2-mailtank/src/migrations/* migrations
Then you have to run migrate
command for creating DB tables.
Usage
Add target class in your project config:
'components' => [
'mailtank' => [
'class' => 'mailtank\Mailtank',
'host' => 'api.mailtank.ru',
'token' => '', // API access key
'templatesPath' => '@app/views/mail', // Path or alias to folder with mailtank templates without end slash
'templatePrefix' => 'testproject.com', // Template prefix, unique for project
'excludeTemplates' => [ // Exclude templates like 'base'
'baseMail',
'subfolder/otherExcludeMail',
],
],
Then use:
Yii::$app->mailtank->send