定制 elliotsawyer/managed-emails 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

  1. add the repository to your composer.json. This is a private repo, so composer will not find it on packagist
  2. composer require elliotsawyer/managed-emails
  3. 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:

  1. Set a label: this is the identifier you'll "look up" within your code
  2. Configure any other recipients: To, CC, BCC, and Reply-To addresses
  3. Set a From address, Subject, and Message body
  4. You can make references to specific variables in your message body, and pass them into into the message body from your code.
  5. 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 我们能提供哪些服务?
定制开发 / 二次开发

基于 elliotsawyer/managed-emails 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 453
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-4
  • 更新时间: 2020-02-16