Change "editquota" email does not work ($xmlapi->api2_query) -- HELP

conseld

Member
Feb 16, 2007
5
0
151
Hello guys, I do not understand where I am going wrong, because to enter, list, remove, change password works. I'm using the module "api2_query" using this API -> https://github.com/CpanelInc/xmlapi-php

Change "editquota" email does not work, even searched here in the forum I had no answer.

Below and script "$ xmlapi-> api2_query" I believe what I'm using is right. Could anyone help me where I am going wrong, what is missing? I will be very grateful for someone to help me.

Email Module Documentation
Email Module Documentation
Code:
Email::editquota 

[B]$qt = array(domain=>'domain.com', email=>'[email protected]', quota=>'12');
$result = $xmlapi->api2_query($userLogin, "Email", "editquota", $qt);
print_r($result);[/B]

// XML return below

<?xml version="1.0" ?>
  <cpanelresult>
    <apiversion>2</apiversion>
    <data>
      <reason>Account does not exist.</reason>
      <result>0</result>
    </data>
    <error>Account does not exist.</error>
    <event>
      <result>1</result>
    </event>
    <func>editquota</func>
    <module>Email</module>
  </cpanelresult>
 

conseld

Member
Feb 16, 2007
5
0
151
Hello thanks for the reply, but I have done with this API1, and that? as shown below. I tried and I still error.

Code:
$qt = array(domain=>'domain.com', email=>'[email protected]', quota=>'12');
$result = $xmlapi->api1_query($userLogin, "Email", "editquota", $qt);
print_r($result);

// XML return below

<?xml version="1.0" ?>
<cpanelresult>
       <module>Email</module>
       <func>editquota</func>
       <type>event</type>
       <source>internal</source>
      <apiversion>1</apiversion>
      <data>
          <result>&lt;br /&gt;&lt;font color=&quot;#FF0000&quot;&gt;Account does not exist.&lt;/font&gt;</result>
       </data>  
   <event>
    <result>1</result>
  </event>
<error>Account does not exist.</error></cpanelresult>
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,883
2,256
463
Hello :)

Upon reviewing your script, I noticed the following:

Code:
$qt = array(domain=>'domain.com', email=>'[email protected]', quota=>'12');
The entry for email should not include the @domain.com suffix. Instead, in your example, it should only use "doteste1".

Thank you.