Description
This function lists the cPanel account's email addresses.
Warning:
We strongly recommend that you use the following UAPI function instead of this function:
-
Email::list_pops
— This function lists the cPanel account's email accounts.
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 |
regex |
string |
A Perl Compatible Regular Expression (PCRE) that filters the results. The system matches the PCRE to both the email address's username and domain. If you do not use this parameter, the function returns all of the cPanel account's email addresses. |
A valid PCRE. |
user |
Returns
Return |
Type |
Description |
Possible values |
Example |
|
string |
The email address, or the main cPanel account's username. |
A valid email address, or the username for the main account. |
user@example.com |
login |
string |
The email address, or the stringMain Account. |
A valid email address, or the string Main Account. |
user@example.com |
suspended_incoming |
Boolean |
Whether the email account's incoming email is suspended. Note: We introduced this return in cPanel & WHM 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: We introduced this return in cPanel & WHM version 54. |
|
0 |
reason |
string |
A reason for failure. Note: This function only returns areason value if there is an error. |
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |