Description
This function retrieves an email account's current disk usage.
Warning:
We strongly recommend that you use the following UAPI function instead of this function:
-
Email::get_disk_usage
— This function retrieves the disk space that an email account uses.
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 |
Required The email account's domain. |
A valid domain. For example, example.com if the email address isuser@example.com. |
example.com |
user |
string |
Required The email account username. |
A valid username. For example, user if the email address isuser@example.com. |
user |
Returns
Return |
Type |
Description |
Possible values |
Example |
domain |
string |
The email account's domain. |
A valid domain.
|
example.com |
user |
string |
The email account username. |
A valid email account username.
|
user |
diskused |
integer |
The disk space that the email account uses, in Megabytes (MB). |
|
0 |
login |
string |
The email address, or the main account username. |
|
user@example.com |
reason |
string |
A reason for failure. Note: This function only returns areason value if it failed. |
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |