Postmark mailer class for SilverStripe
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
code
_config.php
composer.json
license.md
readme.md

readme.md

SilverStripe Postmark Mailer

This module lets you send SilverStripe emails through the official Postmark PHP library, falling back to PHP's built-in sendmail() if Postmark is unreachable.

Requirements

Note: an alternative Postmark Mailer class that works with older versions of SilverStripe and PHP is available here.

Installation

Install with Composer. Learn how

composer require "jonom/silverstripe-postmark-mailer:^1.0"

Documentation

You will need to provide a PostmarkAPP API key and at least one verified email address (Sender Signature) that you have set up in your Postmark account. If you try to send an email from a non-verified address, the From address will be changed to the first verified address you provided and a Reply-To field will be set with the original From address.

Example configuration

In your project's _config.php file:

Email::set_mailer(new PostmarkMailer());

or:

// Send email through Postmark in live environment only
if (Director::isLive()) {
    Email::set_mailer(new PostmarkMailer());
}

In your project's _config/config.yml file:

PostmarkMailer:
  api_key: 'your-key-goes-here'
  sender_signatures:
    - 'example@yourwebsite.com'
    - 'example2@yourwebsite.com'

Maintainer contact

jonathonmenz.com