The remove operation is used to remove one to many mail accounts at one stroke, provided all these accounts refer to the same site. Plesk Administrator can remove any mail account registered in Plesk, while a Plesk customer can delete mail accounts referring to sites that belong to this Plesk customer only.
Request Packet Structure
A request XML packet that deletes mail accounts should include the remove operation node:
The remove node does not have a separate type, it is nested within the MailTypeRequest type (
mail_input.xsd). The remove node has the following graphics representation:
- The filter node is required. It specifies what mail accounts should be removed. Data type: mailFilterType (
- The site-id node is required. It specifies the identifier of the site which mail account (or several) will be deleted. Data type: integer.
- The name node is optional. It specifies the name of the mail account to be deleted. Data type: string.
To remove all mail accounts existing on a site, include to your request packet filter rule containing only site-id node.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The remove node of the response packet is structured as follows:
- The result node is optional. It wraps the result of the requested remove operation. Data type: resultType (
- The status node is required. It returns the execution status of the del operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Returns an error code when the remove operation fails. Data type: unsignedInt.
- The errtext node is optional. Returns an error message if the remove operation fails. Data type: string.
- The mailname node is optional. It is required if the operation succeeds. Returns a list of updated mail accounts. Data type: complex (
- The name node is optional. It contains a mail account name. Data type: string.
The following packet deletes a mail account:
To delete several mail accounts belonging to different sites, use multiple remove sections:
To delete all mail accounts from the specified site, the following packet can be used: