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.
account | string <email> An email address, to limit the function's results. Example: account=user@example.com |
dir | string A mail directory name, to limit results to specific directories. Note: If you pass the Example: dir=maildir |
showdotfiles | integer Default: 0 Whether to include hidden files and directories.
Example: showdotfiles=0 |
apiversion | integer The version of the API. |
func | string The name of the method called. |
module | string The name of the module called. |
object |
uapi --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
}
}