Created
February 20, 2015 11:17
-
-
Save sebastien-bartoli/737ac0412d7c9f22c186 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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