2017 © Pedro Peláez
 

library mandrill

Helthe Mandrill Component

image

helthe/mandrill

Helthe Mandrill Component

  • Wednesday, May 14, 2014
  • by carlalexander
  • Repository
  • 1 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Helthe Mandrill Build Status Scrutinizer Code Quality

Helthe Mandrill is a client library for interacting with the Mandrill API. It is currently designed to be a drop in alternative for sending emails with Mandrill. Features will be added over time to be closer to the official client library. However, for a feature complete client, you should use the official Mandrill client library., (*1)

Installation

Using Composer

Manually

Add the following in your composer.json:, (*2)

{
    "require": {
        // ...
        "helthe/mandrill": "dev-master"
    }
}

Using the command line

$ composer require 'helthe/mandrill=dev-master'

Usage

Client

The Mandrill client uses a Guzzle client for interacting with the Mandrill API and the Symfony Serializer for serializing the data. The serializer is expected to have CustomNormalizer and the JsonEncoder., (*3)

use GuzzleHttp\Client as GuzzleClient;
use Helthe\Component\Mandrill\Client;
use Helthe\Component\Mandrill\Message\Message;
use Symfony\Component\Serializer\Encoder\JsonEncoder;
use Symfony\Component\Serializer\Normalizer\CustomNormalizer;
use Symfony\Component\Serializer\Serializer.

// GuzzleHttp\ClientInterface
$guzzle = new GuzzleClient();
// Symfony\Component\Serializer\SerializerInterface
$serializer = new Serializer(array(new CustomNormalizer()), array(new JsonEncoder()));

$client = new Client($guzzle, $serializer, 'your_api_key');

$client->sendMessage(new Message('recipient@email.com', 'sender@email.com');

Mailer

The mailer classes are design to hide internal workings of the library and offer a standard interface for sending messages. The package offers two mailer classes for you to use., (*4)

Mailer

The Mailer class is used when you want to send regular text/HTML messages., (*5)

TemplatingEngineMailer

The TemplatingEngineMailer class is used when you want to render your message content with using a templating engine implementing the EngineInterfacefrom the Symfony Templating Component., (*6)

Bugs

For bugs or feature requests, please create an issue., (*7)

The Versions

14/05 2014

dev-master

9999999-dev https://helthe.co

Helthe Mandrill Component

  Sources   Download

MIT

The Requires

 

The Development Requires

by Carl Alexander

email mandrill mandrill api