elliotsawyer/managed-emails
Composer 安装命令:
composer require elliotsawyer/managed-emails
包简介
Centrally manage emails used through a SilverStripe site
README 文档
README
Do you have a bunch of emails to send out to your users whenever they do some specific thing that needs their attention? Centrally manage them in the CMS, and refer to them in your codebase using a lookup label field. Content-manage your subject, message body, from address, and CC/BCC/ReplyTo addresses, with support for variables provided by a DataObject. Supports direct sending, or queuedjobs sending if it's available.
This is a ModelAdmin for centrally managing emails within the CMS:
- Specify a from address
- Specify a subject
- Compose an email body
- Add additional recipients, in addition to user supplied ones
- Queue an email to be sent, or configure it to send immediately
Installation
- add the repository to your composer.json. This is a private repo, so composer will not find it on packagist
composer require elliotsawyer/managed-emails- Run
vendor/bin/sake dev/build flush=
Configuration
There are two fields that can be configured.
ElliotSawyer\ManagedEmails\ManagedEmail: #default "From" address default_from_address: 'hello@sawyer.nz' #WYSIWYG field defaults to <p></p>, so can never be empty minimum_body_length: 10
Usage
Define a new Managed Email in the "Email management" admin area:
- Set a label: this is the identifier you'll "look up" within your code
- Configure any other recipients: To, CC, BCC, and Reply-To addresses
- Set a From address, Subject, and Message body
- You can make references to specific variables in your message body, and pass them into into the message body from your code.
- If you have Queued Jobs installed, your message will be queued for sending. If not, it will send immediately
/** * $messageBody = 'Hi {$Member.Email}, this is from {$FromPerson} located at {$Address}.' * **/ $email = ManagedEmail::get()->find('Label', 'EXAMPLE_MESSAGE'); if ($email && $email->ID) { //send a message to an email address, with template variables defined $email->send('someone@example.com', [ 'Member' => Member::get()->first(), 'FromPerson' => 'Elliot Sawyer', 'Address' => '1234 Nowhere Street' ]); }
Copyright
© 2019 Elliot Sawyer, CryptoPay Limited. All rights reserved.
Support
Like my work? Consider shouting me a coffee or a small donation if this module helped you solve a problem. I accept cryptocurrency at the following addresses:
- Bitcoin: 12gSxkqVNr9QMLQMMJdWemBaRRNPghmS3p
- Bitcoin Cash: 1QETPtssFRM981TGjVg74uUX8kShcA44ni
- Litecoin: LbyhaTESx3uQvwwd9So4sGSpi4tTJLKBdz
elliotsawyer/managed-emails 适用场景与选型建议
elliotsawyer/managed-emails 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 453 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 02 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「email」 「silverstripe」 「nz」 「new zealand」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 elliotsawyer/managed-emails 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 elliotsawyer/managed-emails 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 elliotsawyer/managed-emails 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Integrates New Relic with Zend Expressive
Analytics chooser extensions for site settings.
PHP Library for New Relic Agent
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.
统计信息
- 总下载量: 453
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-4
- 更新时间: 2020-02-16