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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

 

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. 
  • If you run CloudLinux™, you must use the full path of the uapi command:

    /usr/local/cpanel/bin/uapi


 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.

This parameter defaults to unlimited.

  • A positive integer that is less than 2048 which represents the maximum amount of disk space in Megabytes (MB).

  • 0 or unlimited, to grant unlimited disk space.
500

Returns

This function only returns metadata.

  • No labels