<?php
// client can de downloaded from https://github.com/Newsman/newsman-api-php
require_once("Newsman/Client.php");
// you can get your API KEY, your newsman_user_id and list_id from My account -> API
$newsman_user_id = "your-username";
$api_key = "your-api-key";
$list_id = "your-list-id";
try {
$client = new Newsman_Client($newsman_user_id, $api_key);
$ret = $client->download->newsletterSent(
$list_id, /* The ID of the list that contains the newsletter for which to get the users */
$newsletter_id, /*The ID of the newsletterfor which to get the users*/
$start_date, /*The start date of the search period*/
$stop_date /*The end date of the search period*/
);
} catch (Exception $e) {
//do something with the error, eg: log $e->getMessage()
}
return $ret;
?>