kinglozzer/silverstripe-mailgunner
Composer 安装命令:
composer require kinglozzer/silverstripe-mailgunner
包简介
Mailgun integration for SilverStripe emails
README 文档
README
A SilverStripe Mailer class to send emails via the Mailgun API.
Installation:
$ composer require kinglozzer/silverstripe-mailgunner:^3.0 php-http/curl-client guzzlehttp/psr7
Note that the Mailgun PHP library uses HTTPlug, so you can switch out the HTTP adapter for another one if you desire. More info is available here.
Configuration:
Set your API key and domain name via the Config API:
--- After: 'silverstripe-mailgun' --- Kinglozzer\SilverStripeMailgunner\Mailer: api_domain: 'samples.mailgun.org' api_key: 'key-3ax6xnjp29jd6fds4gc373sgvjxteol0' --- After: 'silverstripe-mailgun' Only: environment: 'dev' --- # Get your own Postbin ID by visiting http://bin.mailgun.net Kinglozzer\SilverStripeMailgunner\Mailer: api_endpoint: 'http://bin.mailgun.net/62e69d41' debug: true
Note: make sure that you always provide a “from” address, and/or have set the Email.admin_email configuration value.
Batch messages:
You can send an email to a group of recipients via a single API call (without using Cc or Bcc) using Mailgun’s batch sending functionality. This tells Mailgun to send each recipient an email with only their name in the to field. Not using this functionality would result in all recipients’ email addresses being displayed in the to field.
To send a batch email, simply pass all the email addresses you want to send to as the to field, and add an X-Mailgunner-Batch-Message header:
$email = Email::create( $from = 'noreply@example.com', $to = 'user1@example.com, user2@example.com', $subject = 'My awesome email', $content = 'Hello world!' ); $email->addCustomHeader('X-Mailgunner-Batch-Message', true); $email->send();
SilverStripe version compatiblity:
This module has only been tested with SilverStripe 3.2+, but should work with previous versions. In older versions of SilverStripe, you will need to specify the Mailer implementation to use in _config.php:
<?php Email::set_mailer(new Kinglozzer\SilverStripeMailgunner\Mailer);
kinglozzer/silverstripe-mailgunner 适用场景与选型建议
kinglozzer/silverstripe-mailgunner 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12.47k 次下载、GitHub Stars 达 7, 最近一次更新时间为 2016 年 02 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「mailer」 「email」 「silverstripe」 「mailgun」 「mailgunner」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 kinglozzer/silverstripe-mailgunner 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kinglozzer/silverstripe-mailgunner 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 kinglozzer/silverstripe-mailgunner 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Creates new sare mail transport for laravel applications
Analytics chooser extensions for site settings.
Extensible library for building notifications and sending them via different delivery channels.
Email+ extends Kirby's email capabilities by adding support for multiple email services using the same Kirby email API.
CitaNZ's SilverStripe picture object and field for SilverStripe 4
统计信息
- 总下载量: 12.47k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2016-02-27