Description
This function lists the cPanel account's email accounts with disk information.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
domain |
string |
A domain name, to filter the results. If you do not supply a value, the function returns all of the cPanel account's email address. |
A valid domain on the cPanel account. |
example.com |
maxaccounts |
integer |
The maximum number of email addresses to return. If you do not supply a value, the function returns an unlimited number of email addresses. |
A positive value. |
500 |
no_disk |
Boolean |
Whether to skip the collection of disk usage information. Note: We introduced this parameter in cPanel & WHM version 54.
This parameter defaults to 0. |
|
0 |
no_validate |
Boolean |
Whether to skip email database validation. This parameter defaults to 0. |
|
0 |
regex |
string |
A Perl Compatible Regular Expression (PCRE)that filters the results. |
A valid PCRE. For example, /^[a-z0-9_-]{6,18}$/ matches the local portion of an email address, if it contains between six and 18 characters. |
/^[a-z0-9_-]{6,18}$/ |
|
string |
An email address to query, if you only wish to retrieve information for one address. |
A valid email address on the cPanel account. |
user@example.com |
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. |
The path to an image file. |
images/myimg.jpg |
infinitylang |
Boolean |
Whether to return the ∞ character for email addresses with an unlimited quota. This parameter defaults to 0. Note: If you specify 1 for this parameter andthe infinityimg parameter, the function ignores this parameter and returns HTML code for unlimiteddiskquota values.
|
|
0 |
Returns
Return |
Type |
Description |
Possible values |
Example |
|
array of hashes |
An unnamed hash of data for each email address. |
Each hash includes the txtdiskquota,diskquota, diskusedpercent, mtime,diskused, humandiskquota, _diskused, login,email, domain, user, diskusedpercent20,humandiskused, and _diskquota returns. |
|
txtdiskquota |
string |
The email account's disk quota. The function returns this value in each email address's hash. |
|
unlimited |
diskquota |
string |
The email account's disk quota. The function returns this value in each email address's hash. |
Note: The infinityimg and infinitylangparameters determine the value that this value returns for unlimited quotas. |
unlimited |
diskusedpercent |
integer |
The percentage of disk space that the email account uses. The function returns this value in each email address's hash. |
|
0 |
mtime |
integer |
The email account's last modification time, in Unix time. The function returns this value in each email address's hash. |
A time, in the Unix time format. |
1412881950 |
diskused |
integer |
The disk space that the email account uses. The function returns this value in each email address's hash. |
|
399.6 |
humandiskquota |
string |
The disk quota, in human-readable format. The function returns this value in each email address's hash. |
|
555 MB |
_diskused |
integer |
The disk space that the email account uses. The function returns this value in each email address's hash. |
|
399600000 |
login |
string |
The email address, or the main account username. The function returns this value in each email address's hash. |
|
user@example.com |
|
string |
The email address, or the string Main Account. The function returns this value in each email address's hash.
|
|
user@example.com |
domain |
string |
The email account's domain. The function returns this value in each email address's hash. |
The email account's domain. For example, example.com if the email address is user@example.com. |
example.com |
user |
string |
The email account username. The function returns this value in each email address's hash. |
The email account's username. For example, user if the email address isuser@example.com. |
user |
suspended_incoming |
Boolean |
Whether the email account's incoming email is suspended.
Note: cPanel & WHM introduced this value in version 54. |
|
0 |
suspended_login |
Boolean |
Whether the user's ability to log in to, send mail from, and read their email account is suspended. Note: cPanel & WHM introduced this value in version 54. The function returns this value in each email address's hash.
|
|
0 |
humandiskused |
string |
The disk space that the email account uses, in human-readable format. The function returns this value in each email address's hash. |
|
399.6\u00a0bytes |
diskusedpercent20 |
integer |
The percentage of disk space that the email account uses. The function returns this value in each email address's hash. |
|
72 |
_diskquota |
integer |
The disk quota. The function returns this value in each email address's hash. |
|
555000000 |