Return cPanel account's email accounts

This function lists a cPanel account’s email accounts. To prevent falsified data or symlink exploitation, the function uses the specified cPanel account user, rather than root user, to read data from the user’s home directory. The system compares the collected data from the user’s home directory to a server-wide domains list. The comparison of the data validates whether you can trust the data.

Important:

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

SecurityBasicAuth
Request
query Parameters
user
required
string

The cPanel account user for which to list all owned email accounts.

Example: user=example
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/list_pops_for
Request samples
whmapi1 --output=jsonpretty \
  list_pops_for \
  user='example'
Response samples
application/json
{
  • "data": {
    • "pops": [
      • "example1@example.com"
      ]
    },
  • "metadata": {
    • "command": "list_pops_for",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}