Skip to content

Instantly share code, notes, and snippets.

@sebastien-bartoli
Created February 20, 2015 11:17
Show Gist options
  • Save sebastien-bartoli/737ac0412d7c9f22c186 to your computer and use it in GitHub Desktop.
Save sebastien-bartoli/737ac0412d7c9f22c186 to your computer and use it in GitHub Desktop.
<?php
namespace MesDocuments\Helpers;
use \Guzzle\Http\Client;
class Emails{
private static function getMailjet(){
$client = new Client('https://api.mailjet.com/{version}/REST/', array(
'version' => "v3",
'request.options' => array(
'auth' => array('501eaaff4c8b4843fc5b59c412ec04ce', '4c07dc83ddbce2fc26f10005bdc7e6c9', 'Basic'),
'debug' => true
)
));
return $client;
}
public static function send($recipients, $type, $id){
$mj = static::getMailjet();
$request = $mj->get('user');
$response = $request->send();
return $response ;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment