Enabling Mailing List

Use the enable-list operation to enable mailing lists specified by name, ID, site name, or site ID.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet enabling mailing lists includes the enable-list operation node:

<packet version="1.4.2.0">
<maillist>
<enable-list>
...  
</enable-list>
</maillist>
</packet>

 

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

  • The filter node is required. It specifies the filtering rule. For information on this filter, refer to the Available Filters section. Data type: MaillistFilterType (maillist.xsd).

Remarks

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

<enable-list>
   ...
</enable-list>
   ...
<enable-list>
   ...
</enable-list>

 

 

Response Packet Structure

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

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

 

 

Samples

Enabling a single mailing list

This request packet enables mailing list Mylist.

<packet>
<maillist>
<enable-list>
   <filter>
      <name>Mylist</name>
   </filter>
</enable-list>
</maillist>
</packet>

Response:

<packet>
<maillist>
<enable-list>
   <result>
      <status>ok</status>
      <filter-id>Mylist</filter-id>
      <id>5</id>
   </result>
</enable-list>
</maillist>
</packet>

 

If the mailing list was not found on the server, the response looks as follows:

<packet>
<maillist>
<enable-list>
   <result>
      <status>error</status>
      <errcode>1013</errcode>
      <errtext>Mailing list does not exist</errtext>
      <filter-id>Mylist</filter-id>
   </result>
</enable-list>
</maillist>
</packet> 
Enabling multiple mailing lists

This request packet enables mailing lists on Mysite.com and My2site.com sites, and on the site specified by ID 6.

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

Response (if My2site.com site was not found, Mysite.com site contains two mailing lists (specified by ID 1 and ID 2), the site with ID 6 contains one mailing list (specified by ID 7)):

<packet>
<maillist>
<enable-list>
   <result>
      <status>ok</status>
      <filter-id>Mysite.com</filter-id>
      <id>1</id>
   </result>
   <result>
      <status>ok</status>
      <filter-id>Mysite.com</filter-id>
      <id>2</id>
   </result>
   <result>
      <status>error</status>
      <errcode>1015</errcode>
      <errtext>Domain does not exist</errtext>
      <filter-id>My2site.com</filter-id>
   </result>
</enable-list>
 
<enable-list>
   <result>
      <status>ok</status>
      <filter-id>6</filter-id>
      <id>7</id>
   </result>
</enable-list>
 
</maillist>
</packet>

 

 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.