bupy7 / zf-mailgun
此软件包已被废弃且不再维护。未建议替代软件包。
Zend Framework 3 的 Mailgun 模块。
1.0.1
2018-08-23 13:08 UTC
Requires
- php: ^5.6 || ^7.0
- container-interop/container-interop: ^1.2
- guzzlehttp/psr7: ^1.4.2
- mailgun/mailgun-php: ~2.3.2
- php-http/curl-client: ^1.7.0
- zendframework/zend-modulemanager: ^2.7.2
- zendframework/zend-servicemanager: ^3.1
- zendframework/zend-stdlib: ^3.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.2.3
- phpunit/phpunit: >=5.5 <6.0.0
- satooshi/php-coveralls: ^1.0.1
- zendframework/zend-test: ^3.0.1
This package is auto-updated.
Last update: 2020-03-06 19:37:25 UTC
README
这是一个简单的用于 Zend Framework 3 的包装模块。
安装
通过 composer 安装此扩展是首选方式。
运行以下命令
$ php composer.phar require bupy7/zf-mailgun "*"
或将以下内容添加到 composer.json 文件的 require 部分。
"bupy7/zf-mailgun": "*"
使用
使用方法
将模块添加到您的模块列表中
[ 'modules' => [ ... 'Bupy7\Mailgun', ... ], ]
将配置添加到您的本地配置文件中
'mailgun' => [ 'key' => 'key-example', 'endpoint' => 'http://bin.mailgun.net/example', 'debug' => false, ]
现在,您可以发送消息
$mg = $container->get('Bupy7\Mailgun\MailgunService'); $mg->messages()->->send('example.com', [ 'from' => 'bob@example.com', 'to' => 'sally@example.com', 'subject' => 'The PHP SDK is awesome!', 'text' => 'It is so simple to send a message.' ]);
更多信息请参考
Bupy7\Mailgun\Options\ModuleOptions
。
许可证
zf-mailgun 以 BSD-3-Clause 许可证发布。