dev-master
9999999-dev https://helthe.coHelthe Mandrill Component
MIT
The Requires
- php >=5.3.3
- guzzlehttp/guzzle ~4.0
- symfony/serializer ~2.3
The Development Requires
by Carl Alexander
email mandrill mandrill api
Helthe Mandrill Component
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)
Add the following in your composer.json
:, (*2)
{ "require": { // ... "helthe/mandrill": "dev-master" } }
$ composer require 'helthe/mandrill=dev-master'
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');
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)
The Mailer
class is used when you want to send regular text/HTML messages., (*5)
The TemplatingEngineMailer
class is used when you want to render your message
content with using a templating engine implementing the EngineInterface
from
the Symfony Templating Component., (*6)
For bugs or feature requests, please create an issue., (*7)
Helthe Mandrill Component
MIT
email mandrill mandrill api