PHPackages                             milkyway-multimedia/ss-send-this - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. milkyway-multimedia/ss-send-this

ActiveSilverstripe-module[Mail &amp; Notifications](/categories/mail)

milkyway-multimedia/ss-send-this
================================

Mailer for Silverstripe that supports Mandrill, SMTP, Amazon SES and PHP Mail, with logging and tracking

0.1(11y ago)51074[1 PRs](https://github.com/milkyway-multimedia/ss-send-this/pulls)MITPHPPHP &gt;=5.4.0

Since Sep 22Pushed 9y ago3 watchersCompare

[ Source](https://github.com/milkyway-multimedia/ss-send-this)[ Packagist](https://packagist.org/packages/milkyway-multimedia/ss-send-this)[ RSS](/packages/milkyway-multimedia-ss-send-this/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

Send This (Email Transport)
===========================

[](#send-this-email-transport)

**Send This** is another email transport/mailer for Silverstripe, but a bit more comprehensive in it can support different methods of delivery (transports) and has support for web hooks.

It is focused on sending email via API and SMTP, and supports the following methods of transport:

- Mandrill (via API)
- Amazon SES (via API)
- SendGrid (via API)
- Mailgun (via API)
- SparkPost (via API)
- SMTP
- PHP Mail

It also has logging and tracking support on the Silverstripe Side, and web hook handling if you are using Mandrill or Amazon SES (all configurable). It will also handle bounces if you are using the SMTP endpoint of Mandrill or Amazon SES if you prefer that route for some reason...

It is inspired by the Laravel Mail Transport by @taylorotwell, but uses the PHPMailer and HTTP/Guzzle libraries

In future hopefully it will integrate with a Silverstripe Queue Module, so you will be able to push mail off to a queue and make the whole process a little bit faster for the end user.

Install
-------

[](#install)

Add the following to your composer.json file

```

    "require"          : {
		"milkyway-multimedia/ss-send-this": "~0.2"
	}

```

### Web Hook Events

[](#web-hook-events)

To handle web hooks, events are fired. The namespace events currently being used are (not all web hooks use all these events)

- **sendthis:up** The mailer is initialised (the initial headers are passed as an additional argument - casted as an object - at this point, which can be edited by listeners)
- **sendthis:down** The mailer has stopped processing the email
- **sendthis:sending** The email will enter the transport for sending
- **sendthis:sent** The email was successfully sent via the transport
- **sendthis:failed** The email was not sent successfully via the transport
- **sendthis:delivered** The email was successfully delivered by the end point (this differs to the 'sent' hook, which is called by the transport internally)
- **sendthis:bounced** The email bounced - on a hard bounce, the default logging handler fires the 'spam' event
- **sendthis:opened** The email was opened
- **sendthis:clicked** A link in the email was clicked (instead of passing a log, a link object will be passed as the fifth argument)
- **sendthis:spam** The email was marked as spam, or triggered a complaint
- **sendthis:delayed** The email was delayed to avoid flooding (note: most transactional email systems will implement this system, but not all will fire an even when doing so)
- **sendthis:rejected** The email was rejected by the end point
- **sendthis:unsubscribed** The email address was unsubscribed by the end point
- **sendthis:whitelisted** The email address was whitelisted at the end point
- **sendthis:blacklisted** The email address was blacklisted at the end point
- **sendthis:hooked** Web hook has been asked for confirmation from this application
- **sendthis:handled** An event from a web hook was handled

You can use these web hooks to sync your application to the transactional email system.

Events pass four arguments when called: string $messageId, string|array $email, array $params, array $response, $log = null (log is only passed for internal events. For web hooks, you can find the log by message id)

You can subscribe to an event hook by calling

```

    singleton('Milkyway\SS\SendThis\Mailer')->eventful()->listen(['sendthis:sent'], function($messageId = '', $email = '', $params = [], $response = [], $log = '', $headers = null) {});

```

The second parameter is a callable, so it can be an anonymous function, a callable array, or if you pass an object, it will assume the web hook is mapped to a method with the same name on the object (see \_config/listeners.yml for examples)

#### You will have to set up web hooks in Mandrill and Amazon SES separately

[](#you-will-have-to-set-up-web-hooks-in-mandrill-and-amazon-ses-separately)

The following urls will collect web hooks:

- yourwebsite.com/mailer/m: Mandrill
- yourwebsite.com/mailer/a: Amazon SES
- yourwebsite.com/mailer/s: SendGrid
- yourwebsite.com/mailer/g: Mailgun
- yourwebsite.com/mailer/p: SparkPost

### Transports

[](#transports)

By default, this module will use PHP Mail (as per the normal Silverstripe mailer, but implementing PHPMailer). To use the other setups, please read on.

1. None: If no transport is specified, will use php mail() function
2. SMTP: To use this transport, you must specify a **host** that you will send the email through
3. Amazon SES: To use this transport, you must specify a **key** and an access **secret**
4. Mandrill: To use this transport, you must specify a **key**

The following options are available for your YAML config.

```

    SendThis:
      transport: 'default|smtp|ses|mandrill|sendgrid|mailgun|custom' # the default transport/driver

      drivers:
        smtp:
          params:
            host: 'only needed if you are using smtp transport'
            port: '' # optional
            username: '' # optional
            password: '' # optional
            secured_with: '' # optional (accepts tls or ssl)
            keep_alive: false # optional (true/false)

        ses:
          params:
            key: ''
            secret: ''

        mandrill:
          params:
            key: ''

        sendgrid:
          params:
            key: ''

        mailgun:
          params:
            key: ''

      logging: true
      tracking: false
      api_tracking: true (this is slightly different to the above, in that it only uses tracking on the transport rather than CMS based tracking)
      from_same_domain_only: false
      notify_on_fail: false
      blacklist_after_bounced: 2

      filter_from_reports: (you can specify some emails that should be filtered from reports in the CMS, such as test emails)
      filter_from_logs: (you can specify emails that will completely skip logging when sent to)
      headers: (you can specify some default headers that will be sent with all emails as an associative array)

```

License
-------

[](#license)

- MIT

Version
-------

[](#version)

- Version 0.2 (Alpha)

Contact
-------

[](#contact)

#### Milkyway Multimedia

[](#milkyway-multimedia)

- Homepage:
- E-mail:
- Twitter: [@mwmdesign](https://twitter.com/mwmdesign "mwmdesign on twitter")

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~267 days

Total

2

Last Release

4028d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/873db53f59bc2f8309c506d1b56313b0c7d8c7b3160eb1700ee0754d060f9767?d=identicon)[mi3ll](/maintainers/mi3ll)

---

Top Contributors

[![mellm0](https://avatars.githubusercontent.com/u/229937?v=4)](https://github.com/mellm0 "mellm0 (4 commits)")[![willmorgan](https://avatars.githubusercontent.com/u/168688?v=4)](https://github.com/willmorgan "willmorgan (1 commits)")

---

Tags

emailsilverstripe

### Embed Badge

![Health badge](/badges/milkyway-multimedia-ss-send-this/health.svg)

```
[![Health](https://phpackages.com/badges/milkyway-multimedia-ss-send-this/health.svg)](https://phpackages.com/packages/milkyway-multimedia-ss-send-this)
```

###  Alternatives

[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

252143.0k](/packages/erag-laravel-disposable-email)[markguinn/silverstripe-email-helpers

Silverstripe extension containing SMTP mailer class and some other classes for HTML emails

3145.6k1](/packages/markguinn-silverstripe-email-helpers)[unclecheese/silverstripe-permamail

Adds database storage of emails and CMS definition of email templates.

2114.9k](/packages/unclecheese-silverstripe-permamail)[camfindlay/apes

The Automated Provision of Email Services (APES) module will allow you to set up an automated sync mechanism between the SilverStripe Member DataObject and MailChimp.

122.6k](/packages/camfindlay-apes)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
