PHP code example of narno / mailjet-api
1. Go to this page and download the library: Download narno/mailjet-api library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
narno / mailjet-api example snippets
use Narno\Mailjet\Api as MailjetApi;
try {
$api = New MailjetApi('key', 'secret_key');
// fetches user's infos...
$userInfos = $api->user->infos();
if ($userInfos->status == 'OK') {
// ...and displays
print_r($userInfos->infos);
}
} catch (Exception $e) {
echo $e->getMessage();
}