Use the enable operation to activate mailing lists service on a specified site.

Request Packet Structure

A request XML packet activating a mailing lists service includes the enable operation node:

<packet>
<maillist>
<enable>
...
</enable>
</maillist>
</packet>

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

image 36423

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 enabled. 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 enabled. Data type: integer.

Remarks

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

<enable>
   ...
</enable>
   ...
<enable>
   ...
</enable>

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

Response Packet Structure

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

image 36427

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 enable operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. Is returns the error code if the enable operation fails. Data type: integer.
  • The errtext node is optional. It returns the error message if the enable 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

Activating mailing lists service on a single site

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

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

Response:

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

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

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

Enabling mailing lists service on multiple sites

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

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

A positive response from the server can look as follows:

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