Disabling Mailing List
Use the disable-list operation to disable mailing lists specified by name, ID, site name, or site ID.
Request Packet Structure
A request XML packet disabling mailing lists includes the disable-list operation node:
<packet version="1.4.2.0">
<maillist>
<disable-list>
...
</disable-list>
</maillist>
</packet>
The disable-list node is presented by the MaillistDisableListInputType 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 disable multiple mailing lists using different filtering rules in a single packet. Add as many disable-list operations as the number of different filtering rules to be applied.
<disable-list>
...
</disable-list>
...
<disable-list>
...
</disable-list>
Response Packet Structure
The disable-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 disable-list operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Is returns the error code if the disable-list operation fails. Data type: integer.
- The errtext node is optional. It returns the error message if the disable-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. This node does not contain any data for this operation. Data type: integer.
Samples
Disabling a single mailing list
This request packet disables the mailing list Mylist.
<packet>
<maillist>
<disable-list>
<filter>
<name>Mylist</name>
</filter>
</disable-list>
</maillist>
</packet>
Response:
<packet>
<maillist>
<disable-list>
<result>
<status>ok</status>
<filter-id>Mylist</filter-id>
</result>
</disable-list>
</maillist>
</packet>
If the mailing list was not found on the server, the response looks as follows:
<packet>
<maillist>
<disable-list>
<result>
<status>error</status>
<errcode>1013</errcode>
<errtext>Mailing list does not exist</errtext>
<filter-id>Mylist</filter-id>
</result>
</disable-list>
</maillist>
</packet>
Disabling multiple mailing lists
This request packet disables mailing lists on the Mysite.com and the My2site.com sites, and on the site specified by ID 6.
<packet>
<maillist>
<disable-list>
<filter>
<site-name>Mysite.com</site-name>
<site-name>My2site.com</site-name>
</filter>
</disable-list>
<disable-list>
<filter>
<site-id>6</site-id>
</filter>
</disable-list>
</maillist>
</packet>
Response (if the My2site.com site was not found, the Mysite.com site contains two mailing lists, the site with ID 6 contains one mailing list):
<packet>
<maillist>
<disable-list>
<result>
<status>ok</status>
<filter-id>Mysite.com</filter-id>
</result>
<result>
<status>ok</status>
<filter-id>Mysite.com</filter-id>
</result>
<result>
<status>error</status>
<errcode>1015</errcode>
<errtext>Domain does not exist</errtext>
<filter-id>My2site.com</filter-id>
</result>
</disable-list>
<disable-list>
<result>
<status>ok</status>
<filter-id>6</filter-id>
</result>
</disable-list>
</maillist>
</packet>