Description
The Email Delivery Report API allows administrators to search, filter, and view the history of all emails processed by the server. It provides detailed logs including message IDs, sender/recipient info, and delivery status.
This API also supports deleting specific report entries from the database.
parameters
Sample Code
curl --insecure -u "Username:Password" -X GET "https://HOST:2005/index.php?api=json&act=email_delivery_report"<?php
$user = 'root';
$pass = 'Password';
$host = 'Server IP / Hostname';
$url = 'https://'.rawurlencode($user).':'.rawurlencode($pass).'@'.$host.':2005/index.php?api=json&act=email_delivery_report';
$post = [
'searchin' => 'recipient', // Type
'search' => 'user@example.com', // Search String
'match' => 'eq', // Search Type: Exact
'deliverytype' => 'remote', // Delivery Type: Relayed
'start_date' => '2026-03-29 09:15',
'end_date' => '2026-03-31 09:15'
];
// Set the curl parameters
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
if(!empty($post)){
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
}
// Get response from the server.
$resp = curl_exec($ch);
// The response will hold a string as per the API response method.
$res = json_decode($resp, true);
// Done ?
if(!empty($res['done'])){
echo "<pre>";
print_r($res['done']);
echo "</pre>";
}else{
print_r($res['error']);
}