Skip to content

DarkAiR/yii2-mailtank

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yii2-mailtank

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

About

Extension for working with Mailtank Client for Yii 2.x

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages