Child pages
  • UAPI Functions - Email::edit_pop_quota
Skip to end of metadata
Go to start of metadata

Description

This function changes an email address's quota.

Examples


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


Note:

This example calls the UAPI function via a cPanel session. For more information, read our Guide to UAPI documentation. 

 LiveAPI PHP Class
$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',
        )
);


Note:

For more information, read our Guide to the LiveAPI System.

 LiveAPI Perl Module
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',
    }
);


Note:

For more information, read our Guide to the LiveAPI System.

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


Note:

For more information, read our Guide to Template Toolkit documentation. 

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


Notes:

  • You must URI-encode values.
  • username represents your account-level username.
  • For more information and additional output options, read our Guide to UAPI documentation or run the uapi --help command. 

 Output (JSON)
{  
   "messages":null,
   "errors":null,
   "status":1,
   "metadata":{  

   },
   "data":null,
}


Note:

Use cPanel's API Shell interface (cPanel >> Home >> Advanced >> API Shell) to directly test cPanel API calls.

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.

Note:

We introduced this functionality in cPanel & WHM version 70.

This parameter defaults to the defined system value.

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

    Note:

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

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

    Note:

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

500

Returns

This function only returns metadata.