承接 lekoala/silverstripe-mandrill 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

lekoala/silverstripe-mandrill

最新稳定版本:5.0.2

Composer 安装命令:

composer require lekoala/silverstripe-mandrill

包简介

Adds mandrill in the SilverStripe CMS

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage Build Status codecov.io

Latest Stable Version Latest Unstable Version Total Downloads License Monthly Downloads Daily Downloads

codecov.io

Use Mandrill in SilverStripe

Define in your .env file the following constant

MANDRILL_API_KEY='YOUR_API_KEY_HERE'

or by defining the api key in your config.yml

LeKoala\Mandrill\MandrillHelper:
    mandrill_api_key: "key3goes9here"

This module uses the official php sdk version 1.0.54 with a few tweaks.

You can also autoconfigure the module with the following constants in your .env file

# Will log emails in the temp folders
MANDRILL_ENABLE_LOGGING=true
# Will disable sending (useful in development)
MANDRILL_SENDING_DISABLED=true
# Set app domain explicitly
MANDRILL_DOMAIN="mysite.co.nz"
# Also recommended to specify an explicit from
SS_SEND_ALL_EMAILS_FROM="noreply@mysite.co.nz"

By defining the Api Key, the module will register a new mailer that will be used to send all emails.

Integration

This module create a new admin section that allows you to see results from your api calls right from the SilverStripe CMS without having to log into mandrillapp.com

Webhooks

From the Mandrill Admin, you can setup a webhook for your website. This webhook will be called and MandrillController will take care of handling all events for you.

By default, MandrillController will do nothing. Feel free to add your own extensions to MandrillController to define your own rules, like "Send an email to the admin when we receive a spam complaint".

MandrillController provides 4 extensions points:

  • updateHandleAnyEvent
  • updateHandleSyncEvent
  • updateHandleInboundEvent
  • updateHandleMessageEvent

It's recommended that you ensure requests are coming from Mailchimp Transactional rather than an imitator. Webhook authentication is disabled by default but you can enable webhook authentication through the config layer like so:

LeKoala\Mandrill\MandrillController:
  webhook_auth_enabled: true

You'll need your webhook authentication key which you can view and reset from the (Webhooks)[https://mandrillapp.com/settings/webhooks] page in your account. Add your key using the config layer or .env file.

via config

LeKoala\Mandrill\MandrillController:
  webhook_key: YOUR_KEY

via .env file

MANDRILL_WEBHOOK_KEY=YOUR_KEY

Migration from Swift Mailer

SilverStripe 5 replaced swift mailer by symfony/mailer

Make sure to read the docs https://docs.silverstripe.org/en/5/developer_guides/email/ https://symfony.com/doc/current/mailer.html

For SS4 version, check branch 3 and v4 releases

Compatibility

Tested with SilverStripe 5+

Maintainer

LeKoala - thomas@lekoala.be

统计信息

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

GitHub 信息

  • Stars: 18
  • Watchers: 4
  • Forks: 18
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-03-05