Description
This function configures email archiving for a domain.
Warning:
We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists.
Note:
This feature uses the GMT time zone to name directories, select messages to store in each directory, and timestamp messages. You cannot change this behavior.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Warning:
Make certain that you use the correct parameters when you call this function. The function will not return errors if you pass invalid parameters.
Parameter |
Type |
Description |
Possible values |
Example |
domains |
string |
Required One or more domains. |
A comma-separated list of valid domains on the cPanel account. Note: In WHM API calls, replace commas with %2C. |
example.com |
incoming |
integer |
The length of time to archive incoming messages. |
|
365 |
outgoing |
integer |
The length of time to archive outgoing messages. |
|
365 |
mailman |
integer |
The length of time to archive mailing listmessages. |
|
365 |
Returns
Return |
Type |
Description |
Possible values |
Example |
direction |
string |
The archive type. |
|
mailman |
domain |
string |
The domain or domains. |
The domainsinput parameter's value. |
example.com |
statusmsg |
string |
A message of success or a reason for failure. |
|
Updated archive configuration for “example.com”. |
retention_period |
integer |
The length of time to archive mailing list messages. |
|
93 |
status |
boolean |
Whether the function succeeded. |
|
1 |
enabled |
boolean |
Whether archiving is enabled. |
|
1 |
reason |
string |
A reason for failure. Note: This function only returns areasonvalue if it failed. |
A string that describes the error. |
This is an error message. |
result |
boolean |
Whether the function succeeded. |
|
1 |