2017 © Pedro Peláez
 

module zf2-mandrill-module

ZF2 Module that provides helpful services for sending template based mail via the Mandrill REST API

image

netglue/zf2-mandrill-module

ZF2 Module that provides helpful services for sending template based mail via the Mandrill REST API

  • Wednesday, May 21, 2014
  • by netglue
  • Repository
  • 0 Watchers
  • 0 Stars
  • 76 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Mandrill Module for ZF2

This module is intended to provide painless integration of the Mandrill API, (*1)

The module is not feature complete but what's here is reasonably tested., (*2)

Install

Use composer: "netglue/zf2-mandrill-module" : "dev-develop", (*3)

Add to modules with NetglueMandrillModule, (*4)

Configure

Consult config/module.config.php, (*5)

Available Services

  • 'NetglueMandrill\Client\MandrillClient' - An API Client configured with your API Key
  • 'NetglueMandrillModule\Factory\MandrillMessageFactory' - Creates Message instances with pre-configured defaults

Consult `config/, (*6)

Currently...

...this module provides a service so you can easily create pre-configured messages easily. I use it primarily to populate template based messages like this:, (*7)

'myMessageName' => array(
    'template_name' => 'my-template-name-on-mandrill',
    'message' => array(
        'from' => array(
            'name' => 'Me!',
            'email' => 'me@example.com',
        ),
        'subject' => 'Template Based Message',
    ),
),
// ...

// Later on, somewhere in your app:

$factory = $serviceLocator->get('NetglueMandrillModule\Factory\MandrillMessageFactory);
$message = $factory->createMessage('myMessageName');
$message->addRecipient('joe@example.com', 'Joe Bloggs', 'to');
$deliveryResult = $message->send();
var_dump($deliveryResult->isSuccess()); // true with any luck

See Also

The Guzzle backed API Client library, (*8)

Tests

Requires phpunit 3.7 ish. May well work with newer or older versions., (*9)

$ cd path/to/module
$ composer install
$ cd tests
$ nano|vi|whatever config/my.local.php
$ phpunit

Issues/Contributing

Contributions/fixes are much appreciated., (*10)

Add issues to the tracker here, (*11)

The Versions

21/05 2014

dev-master

9999999-dev https://bitbucket.org/netglue/zf2-mandrill-module

ZF2 Module that provides helpful services for sending template based mail via the Mandrill REST API

  Sources   Download

BSD-3-Clause

The Requires

 

email template zf2 zend module netglue

20/05 2014

dev-develop

dev-develop https://bitbucket.org/netglue/zf2-mandrill-module

ZF2 Module that provides helpful services for sending template based mail via the Mandrill REST API

  Sources   Download

BSD-3-Clause

The Requires

 

email template zf2 zend module netglue

20/05 2014

0.1.0

0.1.0.0 https://bitbucket.org/netglue/zf2-mandrill-module

ZF2 Module that provides helpful services for sending template based mail via the Mandrill REST API

  Sources   Download

BSD-3-Clause

The Requires

 

email template zf2 zend module netglue

06/03 2014

0.0.1-alpha

0.0.1.0-alpha https://bitbucket.org/netglue/zf2-mandrill-module

ZF2 Module that provides helpful services for sending template based mail via the Mandrill REST API

  Sources   Download

MIT

The Requires

 

email template zf2 zend module netglue