The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cannot return list of emails with listpopswithdisk

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

  1. gruant2000

    gruant2000 Registered

    Joined:
    Aug 12, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    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?

    Code:
    <?php
    include("xmlapi.php");
    $ip = 'my site ip';
    $account = 'username';
    $domain = 'mysite.com';
    $passwd = 'my password';
    
    $xmlapi = new xmlapi($ip);
    $xmlapi->password_auth($account, $passwd);
    
    $addpop_args = array(
      'domain'=>$domain,
      'email'=>'bobbyjryyy',
      'password'=>'abcd1234MN',
      '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>"; 
    print_r($arrayData); 
    echo "</pre>"; 
    ?>
    SOLVED ...
    I simply forgot to set my output type
     
    #1 gruant2000, Aug 12, 2012
    Last edited: Aug 13, 2012
Loading...

Share This Page