yarcode/yii2-mailgun-mailer
最新稳定版本:1.1.3
Composer 安装命令:
composer require yarcode/yii2-mailgun-mailer
包简介
Mailgun mailer implementation for Yii2
README 文档
README
Mailgun is a transactional email cloud service. Say goodbye to your usual sendmail or postfix MTA problems. You can start sending emails via cloud without writing any line of code.
Installation
The preferred way to install this extension is through composer.
Either run
composer require --prefer-dist yarcode/yii2-mailgun-mailer
or add
"yarcode/yii2-mailgun-mailer": "*"
to the require section of your composer.json.
Usage
Configure YarCode\Yii2\Mailgun\Mailer as your mailer.
'mailer' => [
'class' => \YarCode\Yii2\Mailgun\Mailer::class,
'domain' => 'example.org',
'apiKey' => 'CHANGE-ME',
],
Now you can send your emails as usual.
$message = \Yii::$app->mailer->compose()
->setSubject('test subject')
->setFrom('test@example.org')
->setHtmlBody('test body')
->setTo('user@example.org');
\Yii::$app->mailer->send($message);
Licence
MIT
Links
统计信息
- 总下载量: 75.68k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 16
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-07-28