2017 © Pedro Peláez
 

yii2-extension yii2-chain-mailer

image

alexeevdv/yii2-chain-mailer

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

yii2-chain-mailer

Build Status codecov PHP 5.6 PHP 7.0 PHP 7.1 PHP 7.2, (*1)

Yii2 mailer implementation that allow you to use multiple submailers., (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

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

or add, (*5)

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

to the require section of your composer.json file., (*6)

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, (*7)

The Versions