Retrieving Subscribers' Info

Use the get-members to retrieve e-mail addresses of people who were subscribed to a specified mailing list.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet retrieving info on subscribers of a mailing list includes the get-members operation node:

<packet version="1.4.2.0">
<maillist>
<get-members>
...
</get-members>
</maillist>
</packet>

 

The get-members 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: MaillistSimpleFilterType (maillist.xsd).

Remarks

You can retrieve info on subscribers of multiple mailing lists using different filtering rules in a single packet. Add as many get-members operations as the number of different filtering rules to be applied.

<get-members>
   ...
</get-members>
   ...
<get-members>
   ...
</get-members>

 

 

Response Packet Structure

The get-members node of the output XML packet is presented by type MaillistGetMemberOutputType (maillist.xsd) and structured as follows:

  • The result node is required. It wraps the response retrieved from the server. Data type: GetMemberResultFilterType (maillist.xsd).
  • The status node is required. It specifies the execution status of the get-members operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. Is returns the error code if the get-members operation fails. Data type: integer.
  • The errtext node is optional. It returns the error message if the get-members 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

Retrieving information on subscribers of a single mailing list

This request packet retrieves info on subscribers of the mailing list called MyMailer.

<packet>
<maillist>
<get-members>
   <filter>
      <list-name>MyMailer</list-name>
   </filter>
</get-members>
</maillist>
</packet>

Response (if two subscribers to MyMailer were found):

<packet>
<maillist>
<get-members>
   <result>
      <status>ok</status>
      <filter-id>MyMailer</filter-id>
      <id>mymail@mysite.com</id>
   </result>
   <result>
      <status>ok</status>
      <filter-id>MyMailer</filter-id>
      <id>subscr@mysite.com</id>
   </result>
</get-members>
</maillist>
</packet>

 

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

<packet>
<maillist>
<get-members>
   <result>
      <status>error</status>
      <errcode>1015</errcode>
      <errtext>Mailing list does not exist</errtext>
      <filter-id>MyMailer</filter-id>
   </result>
</get-members>
</maillist>
</packet> 
Retrieving information on subscribers of multiple mailing lists

This request packet retrieves info on subscribers of the mailing list specified by ID 14 and mailing lists called MyList and SubscriptionList.

<packet>
<maillist>
<get-members>
   <filter>
      <list-id>14</list-id>
   </filter>
</get-members>
<get-members>
   <filter>
      <list-name>MyList</list-name>
      <list-name>SubscriptionList</list-name>
   </filter>
</get-members>
</maillist>
</packet>

Response (if each of MyList and SubscriptionList mailing lists have one subscriber, and the mailing list with ID 14 was not found on the server):

<packet>
<maillist>
<get-members>
   <result>
      <status>error</status>
      <errcode>1015</errcode>
      <errtext>Mailing list does not exist</errtext>
      <filter-id>MyMailer</filter-id>
   </result>
</get-members>
<get-members>
   <result>
      <status>ok</status>
      <filter-id>MyList</filter-id>
      <id>mymail@mysite.com</id>
   </result>
   <result>
      <status>ok</status>
      <filter-id>SubscriptionList</filter-id>
      <id>subscr@mysite.com</id>
   </result>
</get-members>
</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.