Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pepipost/pepipost-mandrill-sdk-php
Modified Mandrill SDK working via Pepipost API
https://github.com/pepipost/pepipost-mandrill-sdk-php
Last synced: about 1 month ago
JSON representation
Modified Mandrill SDK working via Pepipost API
- Host: GitHub
- URL: https://github.com/pepipost/pepipost-mandrill-sdk-php
- Owner: pepipost
- License: other
- Created: 2016-04-26T16:56:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-06T11:52:59.000Z (almost 7 years ago)
- Last Synced: 2024-09-17T02:33:22.940Z (3 months ago)
- Language: PHP
- Size: 190 KB
- Stars: 1
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pepipost-mandrill-sdk-php
Modified Mandrill SDK working via Pepipost API# Install
```
curl -s http://getcomposer.org/installer | php
```
```
php composer.phar require pepipost/pepipost-mandrill-sdk-php:dev-master
```# Usage:
```php
"This is your subject",
'from_name' => 'sender name',
'from_email' => '[email protected]',
'html' => 'hi [% NAME %], Pepipost Mandrill Migration API Testing Test
',//file_get_contents($template_files[$j]),
'recipients_cc' => array('[email protected]','[email protected]'),
'bcc' => '[email protected]',
'to' => array(
array(
"email" => '[email protected]',
"name" => ''
)
),
'important' => true,
'track_opens' => true,
'track_clicks' => true,
'tags' => array("Tag1"),
'merge_vars' => array(
array(
"rcpt" => '[email protected]',
"vars" => array(
array(
"name" => "NameOfRecipient1",
"age" => "11"
)
)
)
)
);
//$result = $mandrill->messages->send($message, $async, $ip_pool, $send_at);
try{
$result = $mandrill->messages->send($message);
}
catch(Mandrill_Error $e) {
// Mandrill errors are thrown as exceptions
echo 'A mandrill(via Pepipost) error occurred: ' . get_class($e) . ' - ' . $e->getMessage();
// A mandrill error occurred: Mandrill_Unknown_Subaccount - No subaccount exists with the id 'customer-123'
throw $e;
}print_r($result);