- Created by Documentation, last modified on Oct 05, 2018
disable_authentication_provider
disable_failing_authentication_providers
enable_authentication_provider
get_available_authentication_providers
get_provider_client_configurations
get_provider_configuration_fields
get_provider_display_configurations
get_users_authn_linked_accounts
set_provider_client_configurations
set_provider_display_configurations
twofactorauth_generate_tfa_config
twofactorauth_get_user_configs
cpgreylist_is_server_netblock_trusted
cpgreylist_list_entries_for_common_mail_provider
cpgreylist_load_common_mail_providers_config
cpgreylist_save_common_mail_providers_config
cpgreylist_trust_entries_for_common_mail_provider
cpgreylist_untrust_entries_for_common_mail_provider
create_cpgreylist_trusted_host
delete_cpgreylist_trusted_host
Description
This function lists the status of a cPanel's mail account's mailboxes.
Important:
MailReceive
role, the system disables this function. For more information, read our How to Use Server Profiles documentation.Examples
https://hostname.example.com:2087/cpsess##########/json-api/get_mailbox_status?api.version=1&account=user@example.com
https://hostname.example.com:2087/cpsess##########/xml-api/get_mailbox_status?api.version=1&account=user@example.com
whmapi1 get_mailbox_status account=user@example.com
Notes:
- You must URI-encode values.
- For more information and additional output options, read our Guide to WHM API 1 documentation or run the
whmapi1 --help
command. If you run CloudLinux™, you must use the full path of the
whmapi1
command:/usr/local/cpanel/bin/whmapi1
{ "metadata":{ "command":"get_mailbox_status", "version":1, "result":1, "reason":"OK" }, "data":{ "INBOX.marla_singer@example_com":{ "guid":"1234560f0c58d158c92a000044f0d230", "messages":"0", "vsize":"0" }, "INBOX.angel_face@example_com":{ "guid":"11234560f0c58d158c92a000044f0d23", "messages":"0", "vsize":"0" }, "INBOX.tyler_durden@example_com":{ "guid":"111234560f0c58d158c92a000044f0d2", "messages":"0", "vsize":"0" }, "INBOX.Trash":{ "guid":"1111234560f0c58d158c92a000044f0d", "messages":"0", "vsize":"0" }, "INBOX.narrator@example_com":{ "guid":"11111234560f0c58d158c92a000044f0", "messages":"0", "vsize":"0" }, "INBOX":{ "guid":"111111234560f0c58d158c92a000044f", "vsize":"0", "messages":"0" }, "INBOX.Sent":{ "guid":"1111111234560f0c58d158c92a000004", "messages":"0", "vsize":"0" }, "INBOX.Drafts":{ "guid":"11111111234560f0c58d158c92a00000", "messages":"0", "vsize":"0" }, "INBOX.robert_paulsen@example_com":{ "guid":"111111111234560f0c58d158c92a0000", "messages":"0", "vsize":"0" } } }
<metadata> <command>get_mailbox_status</command> <version>1</version> <result>1</result> <reason>OK</reason> </metadata> <data> <INBOX.marla_singer@example_com> <guid>1234560f0c58d158c92a000044f0d230</guid> <messages>0</messages> <vsize>0</vsize> </INBOX.marla_singer@example_com> <INBOX.angel_face@example_com> <guid>11234560f0c58d158c92a000044f0d23</guid> <messages>0</messages> <vsize>0</vsize> </INBOX.angel_face@example_com> <INBOX.tyler_durden@example_com> <guid>111234560f0c58d158c92a000044f0d2</guid> <messages>0</messages> <vsize>0</vsize> </INBOX.tyler_durden@example_com> <INBOX.Trash> <guid>1111234560f0c58d158c92a000044f0d</guid> <messages>0</messages> <vsize>0</vsize> </INBOX.Trash> <INBOX.narrator@example_com> <guid>11111234560f0c58d158c92a000044f0</guid> <messages>0</messages> <vsize>0</vsize> </INBOX.narrator@example_com> <INBOX> <guid>111111234560f0c58d158c92a000044f</guid> <vsize>0</vsize> <messages>0</messages> </INBOX> <INBOX.Sent> <guid>1111111234560f0c58d158c92a000004</guid> <messages>0</messages> <vsize>0</vsize> </INBOX.Sent> <INBOX.Drafts> <guid>11111111234560f0c58d158c92a00000</guid> <messages>0</messages> <vsize>0</vsize> </INBOX.Drafts> <INBOX.robert_paulsen@example_com> <guid>111111111234560f0c58d158c92a0000</guid> <messages>0</messages> <vsize>0</vsize> </INBOX.robert_paulsen@example_com> </data>
Note:
Parameters
Parameter | Type | Description | Possible values | Example |
---|---|---|---|---|
account | string | Required The email account's name. |
|
|
Returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
mailbox name | hash | A hash that contains information about the mailbox's contents. Note: The mailbox name is the return's name. | This hash contains the guid , messages , and vsize returns. | |
| string | The mailbox globally unique identifier (GUID). Note: We introduced this return in cPanel & WHM version 64. mailbox name hash. | A valid alpha-numeric 32-byte GUID that the account owns. | 1234560f0c58d158c92a000044f0d230 |
| integer | The total number of messages in the mailbox. The function returns this value in the | A valid integer. | 0 |
| integer | The total virtual size of the mailbox's contents, computed with CRLF line terminators. The function returns this value in the | A valid integer that represents the virtual size of the mailbox, in bytes. | 0 |
Function information
API Version:
Available in:
WHM 58+
Methods:
GET, POST
Required Parameters:
Return Formats:
About WHM API 1
WHM API 1 performs functions and accesses data in WHM.
Notes:
- Some functions and parameters may require that you authenticate as the
root
user. - You must use the appropriate WHM ports (
2086
or2087
) to call WHM API functions.
Find a function
Related functions
-
Page:WHM API 1 Sections - Mail — Mail functions manage your server's mail configurations.
-
Page:WHM API 1 Functions - emailtrack_search — This function retrieves email delivery records.
-
Page:WHM API 1 Functions - emailtrack_stats — This function retrieves email tracking statistics.
-
Page:WHM API 1 Functions - emailtrack_user_stats — This function retrieves email tracking statistics for each user.
-
Page:WHM API 1 Functions - expunge_messages_for_mailbox_guid — This function removes mail messages from a cPanel account.