Getting Mail Account Settings
Plesk Administrator can get settings of any mail account registered on any site. Plesk customers are allowed to get settings of mail accounts registered on their own sites only. The settings are as follows:
- Mail account identifier, name, and alias
- Control panel access settings
- Mail box settings
- Automatic responses, redirects, stored files
- Mail group settings
- Mail user permissions
Use the get_info operation to retrieve site settings.
Request Packet Structure
A request XML packet getting a collection of mail account settings should include the get_info operation node:
The get_info node does not have a separate type, it is nested within the MailTypeRequest complex type (
mail_input.xsd). The get_info node has the following graphics representation:
- The filter node is required. It holds a collection of data describing which mail account settings to retrieve. Data type: GetInfoAdvancedFilter (
- The site-id node is required. It specifies the identifier of the site which mail accounts are requested. Data type: integer.
- The mailbox node is optional. It indicates that mail box settings of the specified mail account are requested. Data type: none.
- The mailbox-usage node is optional. If it is present in the request packet, the amount of disk space used by a specific mailbox will be retrieved in the response packet. Data type: none.
- The forwarding node is optional. It indicates that the list of redirects of the specified mail account is requested. Data type: none.
- The aliases node is optional. It indicates that the list of aliases of the given mail account is requested. Data type: none.
- The autoresponder node is optional. It indicates that the list of automatic-response objects of the given mail account is requested. Data type: none.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The get_info node of the response packet is structured as follows:
- The result node is optional. It wraps the result of the requested get_info operation. It can be missing if some error occurs before the validation starts. Data type: resultType (common.xsd).
- The status node is required. It returns the execution status of the get_info operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. It is used to return the error code if the get_info operation fails. Data type: unsignedInt.
- The errtext node is optional. Can be used to return an error message if the get_info operation fails. Data type: string.
- The mailname node is required if the get_info operation succeeds. It contains a collection of mail account settings ordered in the request packet. Data type: mailnameUpdateType (
plesk_mailname.xsd). See the structure of this node in the Mail Account Settings section.
To request information on mail accounts looks as follows: