robertklein/yii2-mailgun
Composer 安装命令:
composer require robertklein/yii2-mailgun
包简介
Mailgun integration with response for the Yii framework
README 文档
README
Mailgun integration with response for the Yii framework
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist robertklein/yii2-mailgun "*"
or add
"robertklein/yii2-mailgun": "*"
to the require section of your composer.json file.
Usage
Configure it in the application configuration:
'components' => [ ... 'mailer' => [ 'class' => 'robertklein\mailgun\Mailer', 'key' => 'key-example', 'domain' => 'mg.example.com', ], ... ],
To send an email, you may use the following code:
Yii::$app->mailer->compose('contact/html', ['contactForm' => $form]) ->setFrom('from@domain.com') ->setTo($form->email) ->setSubject($form->subject) ->send();
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2019-04-24