chrisbarr / mandrill-mailer
This package is abandoned and no longer maintained.
No replacement package was suggested.
SwiftMailer-like interface for sending emails using the Mandrill Messages API
v0.1.1
2015-06-07 21:18 UTC
Requires
- php: >=5.4.0
- guzzlehttp/guzzle: ~5.0
Requires (Dev)
- phpunit/phpunit: ~4.3
This package is auto-updated.
Last update: 2022-12-28 14:24:27 UTC
README
SwiftMailer-like interface for sending emails using the Mandrill Messages API
Basic Usage
Include it using composer:
$ composer require chrisbarr/mandrill-mailer
Or add it to your composer.json file:
{ "require": { "chrisbarr/mandrill-mailer": "~0.1" } }
Then use it like so:
<?php require('vendor/autoload.php'); $mailer = new MandrillMailer/Mailer(MANDRILL_API_KEY); $message = new MandrillMailer/Message(); $message->setFrom('from@example.com', 'From User'); $message->setTo('to@example.com', 'To User'); $message->setSubject('This is my subject'); $message->setHtml('<p>Html goes here</p>'); $mailer->send($message);
See Also
Read more about the Mandrill Messages API here: https://mandrillapp.com/api/docs/messages.JSON.html
Use the official Mandrill PHP library here: https://mandrillapp.com/api/docs/index.php.html
Reasons for developing
- I wanted to use something with a nicer interface than this: https://mandrillapp.com/api/docs/messages.php.html#method-send
- SwiftMailer is excellent at sending emails using SMTP, but I couldn't find an easy way to send messages using an API
- I wanted to use Travis CI and be listed on Packagist :)