# Return email accounts with disk information

This function lists the cPanel account's email accounts with disk information.

Important:

  When you disable the Receive Mail role, the system disables this function.

Endpoint: GET /Email/list_pops_with_disk
Version: 11.136.0.13
Security: BasicAuth

## Query parameters:

  - `domain` (string)
    A domain name to filter the results by. If you do not use this parameter, the function returns all of the cPanel account's email addresses.
    Example: "example.com"

  - `email` (string)
    The cPanel user account to query. If you do not use this parameter, the function returns the email addresses for all cPanel accounts that the user owns.

Note:

 To retrieve information for a single email address, add the domain parameter. For example, email=user&domain=example.com will return information for the email address user@example.com.
    Example: "user"

  - `get_restrictions` (integer)
    Whether to display restriction status for each of the email addresses.
* 1 — Display.
* 0 — Do not display.
    Enum: 0, 1

  - `infinityimg` (string)
    An image to display for email addresses with an unlimited quota. If you specify an infinityimg value, the function returns HTML code to display that image as the diskquota parameter's value.
    Example: "images/myimg.jpg"

  - `infinitylang` (integer)
    Whether to return the ∞ character for email addresses with an unlimited quota.
* 1 — Return the ∞ character for unlimited diskquota values.
* 0 — Return the string unlimited for unlimited diskquota values.

Note:

 If you specify 1 for this parameter and the infinityimg parameter, the function ignores this parameter and returns HTML code for unlimited diskquota values.
    Enum: 0, 1

  - `maxaccounts` (integer)
    The maximum number of email addresses to return. If you do not use this parameter, the function returns an unlimited number of email addresses.
    Example: 500

  - `no_disk` (integer)
    Whether to skip the collection of disk usage information.
* 1 — Do not collect.
* 0 — Collect.
    Enum: 0, 1

  - `no_validate` (integer)
    Whether to skip email database validation.
* 1 — Skip validation.
* 0 — Perform the validation.
    Enum: 0, 1

  - `regex` (string)
    A Perl Compatible Regular Expression (PCRE) that filters the results. For example, /^[a-z0-9_-]{6,18}$/ matches the local portion of an email address, if it contains between six and 18 characters.
    Example: "/^[a-z0-9_-]{6,18}$/"

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "list_pops_with_disk"

  - `module` (string)
    The name of the module called.
    Example: "Email"

  - `result` (object)

  - `result.data` (array)
    An array of objects containing data for each email address.

  - `result.data._diskquota` (integer)
    The disk quota.
* A positive value that represents the disk quota, in bytes.
* 0 - The account possesses an unlimited disk quota.

  - `result.data._diskused` (integer)
    The disk space that the email account uses.
* A positive value that represents the used disk space, in bytes.
* 0 - The account possesses an unlimited disk quota.
    Example: 483

  - `result.data.diskquota` (any)
    The email account's disk quota.
* A positive value that represents the email address's quota, in megabytes (MB).
* unlimited, ∞, or HTML code to display an infinity image - The email account has an unlimited quota.

Note:

  The infinityimg and infinitylang parameters determine the unlimited value for this return.
    Example: "unlimited"

  - `result.data.diskused` (integer)
    The disk space that the email account uses.
* A positive floating-point value that represents the used disk space, in megabytes (MB).
* 0 - The account possesses an unlimited disk quota.

  - `result.data.diskusedpercent` (integer)
    The percentage of disk space that the email account uses.
* A positive value.
* 0 - The account has an unlimited disk quota.

  - `result.data.diskusedpercent20` (integer)
    The percentage of disk space that the email account uses.
* A positive value.
* 0 - The account possesses an unlimited disk quota.

  - `result.data.diskusedpercent_float` (number)
    The floating-point value from which the function derives the diskusedpercent return.
* A floating-point value.
* 0 - Unlimited or disabled disk quota.

Note:

 The diskusedpercent_float number can contain scientific notation values. For example, 1.20494365692139e-05.

  - `result.data.domain` (string)
    The email account's domain. For example, example.com if the email address is user@example.com.
    Example: "example.com"

  - `result.data.email` (any)
    The email address, or the string Main Account.
* A valid email address.
* Main Account
    Example: "user@example.com"

  - `result.data.has_suspended` (integer)
    Whether the email account possesses one of the following suspension parameters: suspended_login suspended_incoming suspended_outgoing hold_outgoing
* 1 - The email account has a suspension.
* 0 - The email account does not have a suspension.

Note:

  The function only returns this value if you pass the get_restrictions=1 parameter.
    Enum: 0, 1

  - `result.data.hold_outgoing` (integer)
    Whether the email account's outgoing email is held in Exim's queue.
* 1 - Outgoing email is held in Exim's queue.
* 0 - Outgoing email is not held in Exim's queue.

Note:

  The function only returns this value if you pass the get_restrictions=1 parameter.
    Enum: 0, 1

  - `result.data.humandiskquota` (any)
    The disk quota, in human-readable format.
* The disk quota and the unit of measure.
* None - The account possesses an unlimited disk quota.
    Example: "None"

  - `result.data.humandiskused` (string)
    The disk space that the email account uses, in human-readable format.
* The disk space that the email account uses, a non-breaking space (\u00a0), and the unit of measure.
* None - The account possesses an unlimited disk quota.
    Example: "483 bytes"

  - `result.data.login` (any)
    The email address, or the main account username.
* A valid email address.
* The username for the main account.
    Example: "user@example.com"

  - `result.data.mtime` (integer)
    The email account's last modification time, in [Unix time](https://wikipedia.org/wiki/Unix_time) format.
    Example: 1415894498

  - `result.data.suspended_incoming` (integer)
    Whether the email account's incoming email is suspended.
* 1 - Suspended.
* 0 - Not suspended.
    Enum: 0, 1

  - `result.data.suspended_login` (integer)
    Whether the user's ability to log in to, send mail from, and read their email account is suspended.
* 1 - Suspended.
* 0 - Not suspended.
    Enum: 0, 1

  - `result.data.suspended_outgoing` (integer)
    Whether the email account's outgoing email is suspended.
* 1 - Suspended.
* 0 - Not suspended.
    Enum: 0, 1

  - `result.data.txtdiskquota` (any)
    The email account's disk quota.
* A positive value that represents the email address's quota, in megabytes (MB).
* unlimited - The email account has an unlimited quota.
    Example: "unlimited"

  - `result.data.user` (string)
    The email account username. For example, user if the email address is user@example.com.
    Example: "user"

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.metadata.transformed` (integer)
    Post-processing may have transformed the data.
    Enum: 1

  - `result.status` (integer)
    * 1 - Success.
* 0 - Failed. Check the errors field for more details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.


