Description
This function retrieves the absolute path to a mail folder.
Warning:
We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Note:
If you do not use either parameter, the function returns the cPanel account's main mail directory (for example,/home/cpaneluser/mail/
for the cpaneluser
account).
Parameter |
Type |
Description |
Possible values |
Example |
account |
string |
An email address, to retrieve that email account's directory. |
A valid email address on the cPanel account. |
user@example.com |
dir |
string |
A mail directory name, to retrieve its absolute path. |
A valid directory on the cPanel account. |
maildir |
Returns
Return |
Type |
Description |
Possible values |
Example |
absdir |
string |
The absolute path to the directory. |
The absolute path to a directory on the cPanel account. |
/home/cpaneluser/mail/example.com/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 |