Removing Mailing List

Use the del-list operation to remove mailing lists. Use filters to specify mailing lists by name, ID, site ID, or site name. For information on filters, refer to Available Filters section.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet removing a mailing list from Plesk database includes the del-list operation node:

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

 

The del-list node is presented by the MaillistDelListInputType 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 remove mailing lists using different filtering rules in a single packet. Add as many del-list operations as the number of different filtering rules to be applied.

<del-list>
   ...
</del-list>
   ...
<del-list>
   ...
</del-list>

 

 

Response Packet Structure

The del-list node of the output XML packet is presented by type MaillistDelOutputType (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 del-list operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. Is returns the error code if the del-list operation fails. Data type: integer.
  • The errtext node is optional. It returns the error message if the del-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 the mailing list ID in Plesk database if the operation succeeds. Data type: integer.

 

 

Samples

Removing a single mailing list

This request packet removes mailing list MyMailer.

<packet>
<maillist>
<del-list>
   <filter>
      <name>MyMailer</name>
   </filter>
</del-list>
</maillist>
</packet>

Reponse:

<packet>
<maillist>
<del-list>
<result>
   <status>ok</status>
   <filter-id>MyMailer</filter-id>
   <id>13</id>
</result>
</del-list>
</maillist>
</packet>

 

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

<packet>
<maillist>
<del-list>
<result>
   <status>error</status>
   <errcode>1013</errcode>
   <errtext>Maillist does not exist</errtext>
   <filter-id>MyMailer</filter-id>
</result>
</del-list>
</maillist>
</packet> 
Removing multiple mailing lists

This request packet removes all mailing lists from site Mysite.com.

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

Response:

<packet>
<maillist>
<del-list>
<result>
   <status>ok</status>
   <filter-id>Mysite.com</filter-id>
   <id>13</id>
</result>
<result>
   <status>ok</status>
   <filter-id>Mysite.com</filter-id>
   <id>18</id>
</result>
<result>
   <status>ok</status>
   <filter-id>Mysite.com</filter-id>
   <id>23</id>
</result>
</del-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.