getMailRcptInfo

Description

Return the full info for a message sent to a 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.
id integer ID of the message.

 

Returned data

Type: array

Description: Return data as an array containing the full message info. Check Appendix 2 for more info about the returned data.

 

Json sample code

<?php

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

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

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

stdClass Object
(
    [type] => d
    [timeLogged] => 1329152691
    [timeQueued] => 1329152674
    [timeImpinted] => 0
    [orig] => demo@mailrelay.com
    [rcpt] => demo@mail.com
    [orcpt] => 
    [dsnAction] => relayed
    [dsnStatus] => 2.0.0 (success)
    [dsnDiag] => smtp;250 2.0.0 Ok: queued as 69BE09585C
    [dsnMta] => st1.ip-zone.com (93.159.209.200)
    [bounceCat] => 
    [srcType] => api
    [srcMta] => 
    [dlvType] => smtp
    [dlvSourceIp] => 93.159.209.111
    [dlvDestinationIp] => 93.159.209.200
    [dlvEsmtpAvailable] => ENHANCEDSTATUSCODES,PIPELINING,8BITMIME,SIZE,DSN,ETRN,STARTTLS
    [dlvSize] => 1939
    [vmta] => joseargudo00_ip-zone_com-6
    [jobId] => 
    [envId] => 
    [sentId] => 54
    [mailingListId] => 16
)
Menu Title