Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    1

    Default List accounts and change quota

    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. #2
    Integration Developer cPanelDavidN's Avatar
    Join Date
    Dec 2009
    Location
    Houston, TX
    Posts
    525

    Default Re: List accounts and change quota

    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
    David Neimeyer
    Integration Developer

    sdk.cpanel.net
    APIs: XML-API API1 & API2
    Check Out: Developer Downloads Integration Blog
    Need Support? Support Ticket Developer Forum Feature Request

Similar Threads & Tags
Similar threads

  1. Change Bandwidth via List Accounts Page
    By DjiXas in forum Feature Requests for cPanel/WHM
    Replies: 1
    Last Post: 09-03-2010, 10:56 AM
  2. WHM/list accounts... all show unlimited quota
    By Data 1 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-13-2010, 04:53 PM
  3. Where are the List Accounts quota stored
    By gearheadhost in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 10-25-2009, 05:23 AM
  4. Ability to Change Theme via List Accounts
    By HaveHost in forum Themes and Branding
    Replies: 5
    Last Post: 09-17-2007, 10:22 AM
  5. Change quota on all accounts
    By CoolMike in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 05-28-2003, 06:27 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube