├── start.php ├── config └── mandrill-sample.php ├── readme.md └── libraries └── mandrill.php /start.php: -------------------------------------------------------------------------------- 1 | __DIR__.'/libraries/mandrill.php', 5 | )); -------------------------------------------------------------------------------- /config/mandrill-sample.php: -------------------------------------------------------------------------------- 1 | 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 6 | 7 | ); -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Mandrill for LaravelPHP # 2 | 3 | This package is a simple wrapper for working w/ the [Mandrill API](http://mandrillapp.com/api/docs/). 4 | The code of the application is based on Scott Travis' [Mailchimp Bundle](https://github.com/swt83/laravel-mailchimp). 5 | 6 | ## Install ## 7 | 8 | In ``application/bundles.php`` add: 9 | 10 | ```php 11 | 'mandrill' => array('auto' => true), 12 | ``` 13 | 14 | Edit the sample config file in ``bundels/mandrill/config/mandrill.php`` and input the proper information. 15 | 16 | ## Usage ## 17 | 18 | Call the desired method and pass the params as a single array. Don't worry about passing the API key. 19 | 20 | ```php 21 | $response = Mandrill::request('messages/send', array( 22 | 'message' => array( 23 | 'html' => 'Body of the message.', 24 | 'subject' => 'Subject of the message.', 25 | 'from_email' => 'monkey@somewhere.com', 26 | 'to' => array(array('email'=>'foo@bar.com')), 27 | ), 28 | )); 29 | ``` 30 | -------------------------------------------------------------------------------- /libraries/mandrill.php: -------------------------------------------------------------------------------- 1 |