gwk / mailjetbundle
Mailjet Bundle for Symfony 2
0.1.2
2013-02-11 14:01 UTC
Requires
- php: >=5.3.3
This package is not auto-updated.
Last update: 2025-03-01 16:17:05 UTC
README
This bundle makes the mailjet library easy to use from a Symfony 2 library
Installation
Simply add the following to your composer.json file
{ "require": { "gwk/mailjetbundle": "0.1" } }
And use composer to install the bundle:
composer.phar update gwk/mailjetbundle
Now add the bundle to your app/AppKernel.php:
$bundles[] = new GWK\MailjetBundle\GWKMailjetBundle();
Configuration
gwk_mailjet: api_key: "YOUR API KEY" # Required secret_key: "YOUR SECRET KEY" # Required debug: true # Optional, defaults to %kernel.debug% debug_level: 2 # Optional, Mailjet debug level, defaults to 1 not used if debug = false format: xml # Optional, the format in which to receive results, defaults to json
Usage
In your code simply request the "mailjet" service to start using it:
$mailjet = $this->get("mailjet"); $mailjet->listsAddContact(array('method' => 'POST', 'contact' => 'foo@bar.com', 'id' => '%list_id%'));
License
MIT, See LICENSE
WARNING Mailjet has attached no license to their library so I'm assuming it's public domain code.