alexeevdv / yii2-chain-mailer
2.0.0
2018-07-16 05:21 UTC
Requires
- yiisoft/yii2: ~2.0
Requires (Dev)
- codeception/codeception: ~2.4.0
- yiisoft/yii2-coding-standards: ~2.0.0
This package is auto-updated.
Last update: 2024-08-29 04:25:45 UTC
README
Yii2 邮件发送实现,允许您使用多个子邮件发送器。
安装
安装此扩展的首选方式是通过 composer。
运行以下命令之一:
$ php composer.phar require alexeevdv/yii2-chain-mailer "~2.0"
或者将以下内容添加到您的 composer.json
文件的 require
部分:
"alexeevdv/yii2-chain-mailer": "~2.0"
到 require
部分。
配置
通过应用程序组件
//... '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 ], ], //... ], //...
限制
如果您使用 embed
和 embedContent
方法,请注意,CID 只会为第一个配置的邮件发送器返回。请记住这一点。