buy
View Email Queue

Description

The Email Queue API allows you to retrieve a list of emails currently waiting in the Exim mail queue. You can fetch the entire server queue or filter results by a specific domain and email user.

parameters

Sample Code

curl --insecure -u "Username:Password" -X GET "https://HOST:2005/index.php?api=json&act=email_queue"
<?php
$user = 'root';
$pass = 'Password';
$host = 'Server IP / Hostname';
	
$url = 'https://'.rawurlencode($user).':'.rawurlencode($pass).'@'.$host.':2005/index.php?api=json&act=email_queue';

// 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);

print_r($res);
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list