alexeevdv/yii2-chain-mailer

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Installs: 203

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

2.0.0 2018-07-16 05:21 UTC

This package is auto-updated.

Last update: 2021-09-29 01:51:21 UTC


README

Build Status codecov PHP 5.6 PHP 7.0 PHP 7.1 PHP 7.2

Yii2 mailer implementation that allow you to use multiple submailers.

Installation

The preferred way to install this extension is through composer.

Either run

$ php composer.phar require alexeevdv/yii2-chain-mailer "~2.0"

or add

"alexeevdv/yii2-chain-mailer": "~2.0"

to the require section of your composer.json file.

Configuration

Through application component

//...
'components' => [
    //...
    'mailer' => [
        'class' => \alexeevdv\yii\ChainMailer::class,
        'mailers' => [
            [
                'class' => \yii\swiftmailer\Mailer::class,
                'userFileTransport' => true,
            ],
            [
                'class' => \alexeevdv\yii\SlackMailer::class,
                'webhook' => 'https://web.hook',
            ],
            // even more mailers here
        ],
    ],
    //...
],
//...

Limitations

If you use embed and embedContent methods you should know that CID will be returnted only for first configured mailer. Keep it in mind