Skip to content

Instantly share code, notes, and snippets.

@jagroop
Last active July 30, 2018 04:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jagroop/d9dc4504d260ae7203095320026e4e62 to your computer and use it in GitHub Desktop.
Save jagroop/d9dc4504d260ae7203095320026e4e62 to your computer and use it in GitHub Desktop.
Mail Jet sample code
<?php
header('Content-Type: application/json');
// Generated by curl-to-PHP: http://incarnate.github.io/curl-to-php/
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.mailjet.com/v3/REST/contactslist/1810371/managemanycontacts/100720361");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_USERPWD, "d27a3b3fef7b3050856084526c43fab3" . ":" . "2d0be36e46e8049c9ec5325869e4452e");
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
echo $result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment