This function lists the mail directory's subdirectories (boxes) and files.
Important:
When you disable the Receive Mail role, the system disables this function.
Notes:
If you do not use any input parameters, the function returns a list of items in the cPanel account's main mail directory.
uapi --output=jsonpretty \ --user=username \ Email \ browse_mailbox
{- "apiversion": 3,
- "func": "browse_mailbox",
- "module": "Email",
- "result": {
- "data": [
- {
- "depth": 2,
- "file": "archive",
- "fullpath": "/home/example/mail/archive",
- "isleaf": 0,
- "ismailbox": 0,
- "mtime": 1413398866,
- "path": "/home/example/mail",
- "relpath": "/archive",
- "type": "dir"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}