Description
This function retrieves an email account's username.
Warning:
We strongly recommend that you use the following UAPI function instead of this function:
-
Email::account_name
— This function returns an email account's username or address.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Note:
You must use either the account
or display
input parameter when you call this function.
Parameter |
Type |
Description |
Possible values |
Example |
account |
string |
The email username or email address, to return the email address or username, respectively. |
|
user@example.com |
display |
string |
Use this parameter without theaccount parameter to return the string All Mail On Your Account. |
A blank value. |
'' |
Returns
Return |
Type |
Description |
Possible values |
Example |
account |
string |
The email account username, the email address, or the string All Mail On Your Account. The input parameter that you use and its value determines the account return's value. |
|
user |
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 |