Description

This function retrieves the system's maximum email quota.

We strongly recommend that you use following UAPI functions instead of this function:

Examples 


https://hostname.example.com:2087/cpsess##########/json-api/cpanel?cpanel_jsonapi_user=user&cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=Email&cpanel_jsonapi_func=get_max_email_quota

$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Retrieve the system maximum email quota.
$max_quota = $cpanel->api2(
    'Email', 'get_max_email_quota' 
);

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Retrieve the system maximum email quota.
my $max_quota = $cpliveapi->api2(
    'Email', 'get_max_email_quota',
);

cpapi2 --user=username Email get_max_email_quota

{
  "cpanelresult": {
    "apiversion": 2,
    "func": "get_max_email_quota",
    "data": [
      {
        "get_max_email_quota": 2048
      }
    ],
    "event": {
      "result": 1
    },
    "module": "Email"
  }
}

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
get_max_email_quota
integerThe system's maximum email quota.A positive integer that measures the quota in Megabytes (MB).2048
reasonstring

A reason for failure.

This function only returns a reason value if it failed. 

A string that describes the error.

This is an error message.
resultBoolean

Whether the function succeeded.

  • 1 — The function succeeded.
  • 0 — The function failed.
1