Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

cannot return list of emails with listpopswithdisk

Discussion in 'cPanel Developers' started by gruant2000, Aug 12, 2012.

  1. gruant2000

    gruant2000 Registered

    Aug 12, 2012
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Website Owner
    For some reason, I simply cannot get a return list of email addresses. I can get a new email to create and I veriified it in cPanel, but I am getting an empty record back when trying to list my emails.
    I am on hostmonster if that helps, and i changed the port to 2083 in xmlapi.php.

    Can anyone spot where I am messing up?

    $ip = 'my site ip';
    $account = 'username';
    $domain = '';
    $passwd = 'my password';
    $xmlapi = new xmlapi($ip);
    $xmlapi->password_auth($account, $passwd);
    $addpop_args = array(
      'quota'=> 50);
    print $xmlapi->api2_query($account, "Email", "addpop", $addpop_args);
    $mylist = $xmlapi->api2_query($account, "Email", "listpopswithdisk", array('domain'=>$domain) );
    require_once "xmltoarray.php"; 
    $xmlObj    = new XmlToArray($mylist); 
    $arrayData = $xmlObj->createArray(); 
    echo "<pre>"; 
    echo "</pre>"; 
    SOLVED ...
    I simply forgot to set my output type
    #1 gruant2000, Aug 12, 2012
    Last edited: Aug 13, 2012

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice