e96/yii2-mailgun-mailer
最新稳定版本:1.5
Composer 安装命令:
composer require e96/yii2-mailgun-mailer
包简介
Mailgun Mailer for Yii 2 framework.
README 文档
README
Mailgun mailer for Yii 2 framework.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist e96/yii2-mailgun-mailer "*"
or add
"e96/yii2-mailgun-mailer": "*"
to the require section of your composer.json file.
Usage
First, update your mailer config like so:
'mailer' => [ 'class' => 'e96\mailgunmailer\Mailer', 'domain' => 'domain.com', 'key' => 'api-key', 'tags' => ['yii'], 'clickTracking' => false, 'opensTracking' => false ],
Yii's mailer will now use the Mailgun configuration, so send mail like normal:
<?php Yii::$app->mailer->compose('<view_name>', <option>) ->setFrom("<from email>") ->setTo("<to email>") ->setSubject("<subject>") // ->setHtmlBody("<b> Hello User </b>") // ->setTextBody("Hello User") ->send(); ?>```
统计信息
- 总下载量: 15.05k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-07-21