eoko / zf-mandrill
ZF2 wrapper for the Mandrill API.
Requires
- php: >=5.5
- eoko/zf-console: ~1.0
- mandrill/mandrill: ~1.0
- slm/queue: ~0.4
- zendframework/zend-console: ~2.5
- zendframework/zend-servicemanager: ~2.5
- zendframework/zend-stdlib: ~2.5
- zendframework/zend-view: ^2.5@dev
Requires (Dev)
- fabpot/php-cs-fixer: 1.7.*
- mockery/mockery: ^1.0@dev
- phpunit/phpunit: ~4.0
- satooshi/php-coveralls: ^0.7.0@dev
- zendframework/zenddiagnostics: ~1.0
- zendframework/zftool: dev-master
This package is not auto-updated.
Last update: 2024-12-25 10:04:20 UTC
README
Introduction
zf-mandrill is a simple wrapper for the Mandrill API. It permit to use the Mandrill API using a pre-configure client in a Zend Framework context.
With this module, you can :
- pre-configure Mandrill client
- check your configuration using zend-diagnostic
- send email from CLI (for testing purpose)
- send email directly from controller
- use email service to send email
Installation
zf-mandrill works with Composer. Make sure you have the composer.phar downloaded and you have a
composer.json
file at the root of your project. To install it, you can do it from CLI composer require eoko/zf-mandrill
or add the following line into your composer.json
file:
"require": { "eoko/zf-mandrill": "dev-master" }
Configuration
Copy/Paste in your local configuration config/mandrill.local.php.dist
and rename it to mandrill.local.php
.
There are all the informations required for zf-mandrill configuration.
Service Available
The following services are pre-configured in the service locator :
- Mandrill client :
eoko.mandrill.client
- Email service :
Eoko\Mandrill\Service\Email
Command
- Check your configuration :
php public/index.php diag
- Send an email :
php public/index.php mandrill send email jane@doe.com subject htmlContent_or_filename
Controller plugin
Inside a controller, we can use the email plugin : $this->email()->setSubject('hello')->setTo('jane@doe.com')->send()