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.

List accounts and change quota

Discussion in 'cPanel Developers' started by pluis3103, Dec 9, 2010.

  1. pluis3103

    pluis3103 Registered

    Joined:
    Dec 9, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hi,
    have done a script that create and delete a email account with that :


    delete
    $xmlapi = new xmlapi($ip);
    $xmlapi->set_port($port);
    $xmlapi->password_auth($account, $passwd);
    $email_account = "teste2";

    $args = array(
    'domain'=>$email_domain,
    'email'=>$email_account ) ;

    $xmlapi->api2_query($account, "Email", "delpop", $args);


    __________________________________________________________

    create

    $xmlapi = new xmlapi($ip);
    $xmlapi->set_port($port);
    $xmlapi->password_auth($account, $passwd);
    $call = array(domain=>$email_domain, email=>$email_user, password=>$email_pass, quota=>$email_quota);
    $xmlapi->set_debug(1);
    $result = $xmlapi->api2_query($account, "Email", "addpop", $call ); // making call to cpanel api

    ______________________________________________________

    Now I want to make the same to list email accounts and to see and change quota off a email account.

    Could you help me , please??

    Thanks

    Paulo
     
  2. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hi Paulo,

    To list the accounts you'll want to use API2 Email::listpopswithdisk documented here Email::listpopswithdisk. To change the quote use API2 Email::editquota documented here Email::editquota

    You'll call them in the same way as you did for the API2 calls Email::delpop and Email::addpop

    Best Regards,
    -DavidN
     
Loading...

Share This Page