I've found the file that changes the quota for the email accounts. Its at
Code:
/usr/local/cpanel/base/frontend/x3/mail/doeditquota.html
The line that changes the quota is:
Code:
<cpanel Email="editquota($FORM{'email'},$FORM{'domain'},$FORM{'quota'})">
I'd like to use this to change all the quotas for an 800 email account, but I can't figure out how to use the API to accomplish this, I created a PHP file in
Code:
/usr/local/cpanel/base/frontend/x3/mail/
with the following code:
Code:
<?php
include("/usr/local/cpanel/php/cpanel.php");
$cpanel = &new CPANEL();
//$array = $cpanel->api2('Email', 'listpopswithdisk' , array("domain"=> "domain.tld"));
$array = $cpanel->api2('Email', 'editquota' , array("domain"=> "domain.tld","email"=>"user","quota"=>"100"));
print_r($array);
$cpanel->end();
?>
but when I run that from my browser (after logging into cPanel), I get the following output and the quota does NOT change:
Code:
Array
(
[cpanelresult] => Array
(
[apiversion] => 2
[func] => editquota
[module] => Email
)
)
I think this might be because the editquota function is not listed here: http://www.cpanel.net/plugins/api2/index.html
So does anyone know how to run the editquota function for emails programmatically? Thanks in advance.