dotblue/mandrill
最新稳定版本:v1.4.0
Composer 安装命令:
composer require dotblue/mandrill
包简介
OO wrapper above Mandrill API for sending e-mails
关键字:
README 文档
README
This is an OO library wrapping around Mandrill API for sending messages. Enjoy!
Requirements
PHP 5.4+ (we love short array syntax).
curl
Installation
The easiest way is to use Composer:
$ composer require dotblue/mandrill@~1.2
Of course you can always clone this repository and commit it into your project manually.
Usage
$mandrill = new DotBlue\Mandrill\Mandrill($apiKey); $mailer = new DotBlue\Mandrill\Mailer(new DotBlue\Mandrill\Exporters\MessageExporter(), $mandrill); $message = new DotBlue\Mandrill\Message(); $message->setFrom('maesters@citadel.sif'); $message->subject = 'Winter is coming!'; $message->addTo('jeoffrey@baratheon.sif'); $message->addBcc('varys@spider.sif'); $message->addBcc('petyr@baelish.sif'); $message->html = '<html><body>Winter is coming!</body></html>'; $message->text = 'Winter is coming!'; $mailer->send($message);
Similary you can send a template by using class DotBlue\Mandrill\TemplateMessage in combination
with DotBlue\Mandrill\Mailer::sendTemplate method.
You can find more examples in Documentation
统计信息
- 总下载量: 76.14k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 15
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2014-01-27