I have been able to add and delete email accounts to the api using a similar code to this.
But im not able to list the email accounts , i have been reading here in the forum and i found that it can be done with listpopswithdisk, but it doesnt display anything, anyone knows what im doing wrong?
But im not able to list the email accounts , i have been reading here in the forum and i found that it can be done with listpopswithdisk, but it doesnt display anything, anyone knows what im doing wrong?
PHP:
<?php
include "xmlapi.php";
$ip = 'localhost';
$account_pass = 'xxx'; // cpanel password
$account = 'xxx'; // cpanel username
$email_domain = "xxx"; // domain associated with the email account
$xmlapi = new xmlapi($ip);
$xmlapi->password_auth($account, $account_pass);
$xmlapi->set_port(2083);
$xmlapi->set_debug(1); // uncomment for debugging
$args = array(
'domain' => $email_domain,
);
print $xmlapi->api2_query($account, 'Email', 'listpopswithdisk', $args);
?>