Description

This function changes an email address's quota.


Examples




https://hostname.example.com:2083/cpsess##########/execute/Email/edit_pop_quota?email=user&quota=0&domain=example.com



$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Update user@example.com's quota.
$change_quota = $cpanel->uapi(
    'Email', 'edit_pop_quota',
    array(
        'email'           => 'user',
        'quota'           => '0',
        'domain'          => 'example.com',
        )
);



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Update user@example.com's quota.
my $change_quota = $cpliveapi->uapi(
    'Email', 'edit_pop_quota',
    {
        'email'           => 'user',
        'quota'           => '0',
        'domain'          => 'example.com',
    }
);



<!-- Update user@example.com's quota. -->
[% execute('Email', 'edit_pop_quota', { 'email' => 'user', 'quota' => '0', 'domain' => 'example.com', } ) %]



uapi --user=username Email edit_pop_quota email=user quota=0 domain=example.com



{  
   "messages":null,
   "errors":null,
   "status":1,
   "metadata":{  

   },
   "data":null,
}



Parameters

ParameterTypeDescriptionPossible valuesExample
emailstring

Required

The email account username.

A valid email account username.

For example, user if the email address is user@example.com.

user
domainstring

Required

The email account's domain.

This parameter defaults to the cPanel account's main domain.

A valid domain on the cPanel account.

For example, example.com if the email address is user@example.com.

example.com
quotastring

The maximum amount of disk space that the new email account may use.

We introduced this functionality in cPanel & WHM version 72.

This parameter defaults to the defined system value.

  • A positive integer that represents the maximum amount of disk space, in Megabytes (MB).

    You cannot enter a value that exceeds the maximum email quota.


  • 0 or unlimited — The account possesses unlimited disk space.

    This value is only available to users without a maximum email account quota.


500

Returns

This function only returns metadata.