getMailRcptNumber

Description

Get the number of messages sent to the specified recipient.



Params

Name Type Description
apiKey string API key previously generated.
email string Email address of the recipient.
date string Date to search in the following format: YYYY-MM-DD.

 

Returned data

Type: integer

Description: Return an integer with the number of messages sent.

 

Json sample code

<?php

$curl = curl_init('https://your_address/ccm/admin/api/version/2/&type=json');

$postData = array(
    'function' => 'getMailRcptNumber',
    'apiKey' => 'apiKey',
    'email' => 'user@example.org',
    'date' => '2010-02-15',
);

curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($postData));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

$json = curl_exec($curl);
if ($json === false) {
    die('Request failed with error: '. curl_error($curl));
}

$result = json_decode($json);
if ($result->status == 0) {
    die('Bad status returned. Error: '. $result->error);
}

var_dump($result->data);

 

Result of API call

int(4)
Menu Title