Child pages
  • UAPI Functions - Email::edit_pop_quota

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt
This function changes an email address's quota.


Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone


Expand
titlecPanel or Webmail Session URL


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

Include Page
LIB:_CallUAPIFromBrowserLink
LIB:_CallUAPIFromBrowserLink


Expand
titleLiveAPI PHP Class


Code Block
languagephp
linenumberstrue
$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',
        )
);

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink


Expand
titleLiveAPI Perl Module


Code Block
languageperl
linenumberstrue
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',
    }
);

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink


Expand
titlecPanel Template Toolkit


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

Include Page
LIB:_TTLink
LIB:_TTLink


Expand
titleCommand Line


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

Include Page
LIB:_UAPICLINote
LIB:_UAPICLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{  
   "messages":null,
   "errors":null,
   "status":1,
   "metadata":{  

   },
   "data":null,
}


Include Page
LIB:_cPanelAPIShellNote
LIB:_cPanelAPIShellNote


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
titleNote:

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
    titleNote:

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


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

    Note
    titleNote:

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


500

Returns

This function only returns metadata.