Use the set_prefs operation to set mail service preferences on the specified sites.
Request Packet Structure
A request XML packet setting mail service preferences for the specified sites includes the set_prefs operation node:
The set_prefs node does not have a separate data type, it is nested within the MailTypeRequest type (
mail_input.xsd). The set_prefs node has the following graphics representation:
- The filter node is required. It specifies a list of sites on which mail service settings are modified. Data type: none.
- The site-id node is optional. It specifies the identifier of the site on which mail service settings are modified. Data type: integer.
- The prefs node is required. It specifies a collection of mail service preferences that will be set for the specified sites. Data type: MailPreferences. The structure of this node is described in the Mail Service Settings section.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The set_prefs node of the response packet is structured as follows:
- The result node is optional. It wraps the result of the requested set_prefs operation. Data type: resultType (
- The status node is required. It returns the execution status of the set_prefs operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. It is used to return an error code if the set_prefs operation fails. Data type: unsignedInt.
- The errtext node is optional. Can be used to return an error message if the set_prefs operation fails. Data type: string.
- The site-id node is optional. Returns the identifier of the site on which mail service settings have been modified. Data type: integer.
Setting Mail Service Preferences under Plesk Administrator
Plesk Administrator can set mail service preferences for all sites registered in Plesk.
Setting mail service preferences for particular sites
The following packet sets mail service preferences for three sites:
To set different settings for different sites within a single packet, use multiple set_prefs elements:
Setting mail service preferences for all sites registered in Plesk
If the filter is empty, the specified settings will be applied to all sites registered in Plesk:
Setting Email Service Settings under customer
All the use cases of the set_prefs operation node for customers are similar to those for Plesk Administrator. The only difference is that an empty filter means that the specified settings will be applied to all sites belonging to the customer sending the packet: