Use the disable operation to deactivate mailing lists service on a specified site.

Request Packet Structure

A request XML packet deactivating a mailing lists service includes the disable operation node:

<packet>
<maillist>
<disable>
...
</disable>
</maillist>
</packet>

The disable node is presented by the MaillistDisableInputType type (maillist.xsd), and its graphical representation is as follows:

image 36441

Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_input.svg.

  • The filter node is required. It specifies the filtering rule. For information on this filter, refer to the Available Filters section. Data type: MaillistToggleFilterType (maillist.xsd) .
  • The site-id node is required. It specifies the ID of the site address, on which the mailing service is to be disabled. Data type: integer.
  • The site-name node is required. It specifies the name of the site address, on which the mailing service is to be disabled. Data type: integer.

Remarks

You can deactivate mailing lists service on multiple sites using different filtering rules in a single packet. Add as many disable operations as the number of different filtering rules to be applied.

<disable>
   ...
</disable>
   ...
<disable>
   ...
</disable>

Note: When creating request packets, put nodes and elements in the order they follow in the packet structure.

Response Packet Structure

The disable node of the output XML packet is presented by type MaillistDisableOutputType (maillist.xsd) and structured as follows:

image 36444

Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_output.svg.

  • The result node is required. It wraps the response retrieved from the server. Data type: resultFilterType (common.xsd).
  • The status node is required. It specifies the execution status of the disable operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. Is returns the error code if the disable operation fails. Data type: integer.
  • The errtext node is optional. It returns the error message if the disable operation fails. Data type: string.
  • The filter-id node is optional. It holds the filtering rule parameter. For information, refer to the Available Filters section. Data type: anySimpleType.
  • The id node is optional. This node does not contain any data for this operation. Data type: integer.

Samples

Deactivating mailing lists service on a single site

This request packet deactivates the mailing lists service on the site called Mysite.com.

<packet>
<maillist>
<disable>
   <filter>
      <site-name>Mysite.com</site-name>
   </filter>
</disable>
</maillist>
</packet>

Response:

<packet>
<maillist>
<disable>
   <result>
      <status>ok</status>
      <filter-id>Mysite.com</filter-id>
   </result>
</disable>
</maillist>
</packet>

If the site was not found on the server, the result looks as follows:

<packet>
<maillist>
<disable>
   <result>
      <status>error</status>
      <errcode>1015</errcode>
      <errtext>Domain does not exist</errtext>
      <filter-id>Mysite.com</filter-id>
   </result>
</disable>
</maillist>
</packet>

Deactivating mailing lists service on multiple sites

This request packet deactivates mailing list service on the sites Mysite.com, My2site.com, and on the site specified by ID 5.

<packet>
<maillist>
<disable>
   <filter>
      <site-name>Mysite.com</site-name>
      <site-name>My2site.com</site-name>
   </filter>
</disable>
<disable>
   <filter>
      <site-id>5</site-id>
   </filter>
</disable>
</maillist>
</packet>

A positive response from the server can look as follows:

<packet>
<maillist>
<disable>
   <result>
      <status>ok</status>
      <filter-id>Mysite.com</filter-id>
   </result>
   <result>
      <status>ok</status>
      <filter-id>My2site.com</filter-id>
   </result>
</disable>
<disable>
   <result>
      <status>ok</status>
      <filter-id>5</filter-id>
   </result>
</disable>
</maillist>
</packet>