2017 © Pedro Peláez
 

library pepipost-mandrill-sdk-php

MODIFIED - API client library for the Mandrill email as a service platform

image

pepipost/pepipost-mandrill-sdk-php

MODIFIED - API client library for the Mandrill email as a service platform

  • Tuesday, March 6, 2018
  • by itabrezshaikh
  • Repository
  • 2 Watchers
  • 0 Stars
  • 42 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 14 % Grown

The README.md

pepipost-mandrill-sdk-php

Modified Mandrill SDK working via Pepipost API, (*1)

Install

curl -s http://getcomposer.org/installer | php
php composer.phar require pepipost/pepipost-mandrill-sdk-php:dev-master

Usage:

```php <?php require 'vendor/autoload.php'; $mandrill = new Mandrill('yourPepipostsecretkey'); // PEPIPOST API KEY HERE $message = array( 'subject' => "This is your subject", 'from_name' => 'sender name', 'from_email' => 'from@example.com', 'html' => ', (*2)

hi [% NAME %], Pepipost Mandrill Migration API Testing Test, (*3)

',//file_get_contents($template_files[$j]), 'recipients_cc' => array('recipient1@domain.com','recipient2@example.com'), 'bcc' => 'bcc@domain.com', 'to' => array( array( "email" => 'recipient@example.com', "name" => '' ) ), 'important' => true, 'track_opens' => true, 'track_clicks' => true, 'tags' => array("Tag1"), 'merge_vars' => array( array( "rcpt" => 'recipient@example.com', "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; }, (*4)

print_r($result);, (*5)

The Versions

06/03 2018

dev-master

9999999-dev http://www.pepipost.com/index.php/mandrill-alternative/

MODIFIED - API client library for the Mandrill email as a service platform

  Sources   Download

Apache-2.0

The Requires

  • php >=5.2.0

 

api email