v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
Email
Email Accounts

Return current user's account name

This function returns the provided value. This function works with other functions to display form data within a user interface.

Note:

If you call this function from a Webmail session URL, the system will only access data for that email account.

Important:

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

get/Email/account_name

Query parameters

accountstring
Example:user

The function will return this value in the data return. If you do not include this parameter, the function returns All Mail On The Account or a blank value.

  • A valid string.
  • An empty value.

Note:

The function does not validate this parameter's value.

displaystring
Example:any_value

Include this parameter to cause the function to return All Mail On The Account if the account parameter is blank or does not exist. If you do not include this parameter and the account value is blank or does not exist, the function returns a blank data value.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "account_name",
  "module": "Email",
  "result": {
    "data": "user@example.com",
    "status": 1
  }
}