Removing Subscriber
Use the del-member to remove a subscriber from specified mailing lists.
Request Packet Structure
A request XML packet removing a subscriber from the specified mailing lists includes the del-member operation node:
<packet>
<maillist>
<del-member>
...
</del-member>
</maillist>
</packet>
The add-member node is presented by the MaillistAddMemberInputType type (maillist.xsd
), and its graphical representation is as follows:
- The filter node is required. It specifies the filtering rule. You can remove a person specified by id from multiple mailing lists in a single packet. For information on this filter, refer to the Available Filters section. Data type: MaillistSimpleFilterType (
maillist.xsd
). - The id node is required. It specifies the subscriber's e-mail address. Data type: emailType (
common.xsd
).
Remarks
You can delete a subscriber from multiple mailing lists using different filtering rules in a single packet. Add as many del-member operations as the number of different filtering rules to be applied.
<del-member>
...
</del-member>
...
<del-member>
...
</del-member>
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The del-member node of the output XML packet is presented by type MaillistDelMemberOutputType (maillist.xsd
) and structured as follows:
- The result node is required. It wraps the response retrieved from the server. Data type: MaillistMemberResultType (
maillist.xsd
). - The status node is required. It specifies the execution status of the del-member operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Is returns the error code if the del-member operation fails. Data type: integer.
- The errtext node is optional. It returns the error message if the del-member 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 subscriber's e-mail address if the operation succeeds. Data type: emailType (
common.xsd
).
Samples
Removing a subscriber from a single mailing list
This request packet removes the subscriber with e-mail address mymail@mysite.com from mailing list MyMailer.
<packet>
<maillist>
<del-member>
<filter>
<list-name>MyMailer</list-name>
</filter>
<id>mymail@mysite.com</id>
</del-member>
</maillist>
</packet>
Response:
<packet>
<maillist>
<del-member>
<result>
<status>ok</status>
<filter-id>MyMailer</filter-id>
<id>mymail@mysite.com</id>
</result>
</del-member>
</maillist>
</packet>
If the subscriber was not subscribed to MyMailer, the response looks as follows:
<packet>
<maillist>
<get-members>
<result>
<status>error</status>
<errcode>1023</errcode>
<errtext>Member is not subscribed to mailing list</errtext>
<filter-id>MyMailer</filter-id>
</result>
</get-members>
</maillist>
</packet>
Removing a subscriber from multiple mailing lists
This request packet removes the subscriber with e-mail address mymail@mysite.com from mailing lists MyMailer and SubscribeMe.
<packet>
<maillist>
<del-member>
<filter>
<list-name>MyMailer</list-name>
<list-name>SubscribeMe</list-name>
</filter>
<id>mymail@mysite.com</id>
</del-member>
</maillist>
</packet>
The positive response from the server looks as follows:
<packet>
<maillist>
<del-member>
<result>
<status>ok</status>
<filter-id>MyMailer</filter-id>
<id>mymail@mysite.com</id>
</result>
<result>
<status>ok</status>
<filter-id>SubscribeMe</filter-id>
<id>mymail@mysite.com</id>
</result>
</del-member>
</maillist>
</packet>