Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function lists the account's mailbox size and globally unique identifier (GUID) by folder.

Examples 


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/Mailboxes/get_mailbox_status_list?account=user@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.
 
// List the account's mailbox size and GUID by folder.
$Mailboxes_get_mailbox_status_list = $cpanel->uapi(
    'Mailboxes', 'get_mailbox_status_list'
);

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.
 
# List the account's mailbox size and GUID by folder.
my $Mailboxes_get_mailbox_status_list = $cpliveapi->uapi(
    'Mailboxes', 'get_mailbox_status_list',
);

Note:

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

 cPanel Template Toolkit
<!-- List the account's mailbox size and GUID by folder. -->
[% data = execute( 'Mailboxes', 'get_mailbox_status_list' ); %]
[% FOREACH q = data %]
     <p>
         [% q %]
     </p>
[% END %]

Note:

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

 Command Line
uapi --user=username Mailboxes get_mailbox_status_list account=user@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. 
  • We introduced this functionality in cPanel & WHM version 56.

 Output (JSON)
{
  "messages":null,
  "errors":null,
  "status":1,
  "metadata":{
	"transformed":1
  },
  "data": [
      {  
         "guid":"1234560f0c58d158c92a000044f0d230",
         "messages":"0",
         "mailbox":"INBOX.marla_singer@example_com",
         "vsize":"0"
      },
      {  
         "guid":"11234560f0c58d158c92a000044f0d23",
         "messages":"0",
         "mailbox":"INBOX.angel_face@example_com",
         "vsize":"0"
      },
      {  
         "guid":"111234560f0c58d158c92a000044f0d2",
         "messages":"0",
         "mailbox":"INBOX.tyler_durden@example_com",
         "vsize":"0"
      },
      {  
         "guid":"1111234560f0c58d158c92a000044f0d",
         "messages":"0",
         "mailbox":"INBOX.Trash",
         "vsize":"0"
      },
      {  
         "guid":"11111234560f0c58d158c92a000044f0",
         "messages":"0",
         "mailbox":"INBOX.narrator@example_com",
         "vsize":"0"
      },
      {  
         "guid":"111111234560f0c58d158c92a000044f",
         "messages":"0",
         "mailbox":"INBOX",
         "vsize":"0"
      },
      {  
         "guid":"1111111234560f0c58d158c92a000004",
         "messages":"0",
         "mailbox":"INBOX.Sent",
         "vsize":"0"
      },
      {  
         "guid":"11111111234560f0c58d158c92a00000",
         "messages":"0",
         "mailbox":"INBOX.Drafts",
         "vsize":"0"
      },
      {  
         "guid":"111111111234560f0c58d158c92a0000",
         "messages":"0",
         "mailbox":"INBOX.robert_paulsen@example_com",
         "vsize":"0"
      }
   ]
}

Note:

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

Parameters

ParameterTypeDescriptionPossible valuesExample
account
string

Required

The email account for which you you wish to request the status.

A valid email account that the cPanel account owns.user@example.com

Returns

ReturnTypeDescriptionPossible valuesExample
 
arrayAn array of account information. This returns information about the mailbox folder of an account's email.

This array contains the guid, messages and vsize returns.

 

guid

string

The mailbox GUID.

This value returns in the unnamed array.

A valid alpha-numeric 32-byte GUID that the account owns.
1234560f0c58d158c92a000044f0d230

mailbox

string
The mailbox name.
  This value returns in the unnamed array.

A valid mailbox folder on the server that the user owns.

INBOX.marla_singer@example_com

messages

string

The number of messages in the folder.

This value returns in the unnamed array.

A positive integer.410

vsize

string

The size of the folder, in bytes.

This value returns in the unnamed array.

A positive integer.
1052299