Use the get-members to retrieve e-mail addresses of people who were subscribed to a specified mailing list.
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:
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>
The get-members node of the output XML packet is presented by type MaillistGetMemberOutputType (maillist.xsd
) and structured as follows:
maillist.xsd
).common.xsd
).
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>
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>