Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devside/mandrill
Mandrill module for Kohana 3
https://github.com/devside/mandrill
Last synced: 24 days ago
JSON representation
Mandrill module for Kohana 3
- Host: GitHub
- URL: https://github.com/devside/mandrill
- Owner: DevSide
- Created: 2014-03-06T14:55:00.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-03-07T10:18:20.000Z (over 10 years ago)
- Last Synced: 2023-08-17T12:17:39.341Z (about 1 year ago)
- Language: PHP
- Size: 117 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#Mandrill module for Kohana 3
This module allows you to communicate with Mandrill API 1.0
[Mandrill API documentation](https://github.com/kohana/kohana)
---##Requirements
* PHP Curl extension##Example
Asynchronous send with two recipients.
```php
// Email template
$view = View::factory('mailing/template');// Email parameters
$params = array(
'html' => $view->render(),
'subject' => 'Test template',
'from_email' => '[email protected]',
'from_name' => 'Mr X',
'to' => array(
array(
'email' => '[email protected]'
),
array(
'email' => '[email protected]'
)
),
'preserve_recipients' => false,
'metadata' => array(
'page_id' => 1,
),
'recipient_metadata' => array(
array(
"rcpt" => "[email protected]",
"values" => array("id" => 1)
),
array(
"rcpt" => "[email protected]",
"values" => array("id" => 2)
),
)
);// Send asynchronous email and receive Mandrill response
$resultJson = Mandrill::instance()->call(array(
'type' => 'messages',
'call' => 'send',
'message' => $params,
'async' => true
));
```