System.DirectoryServices

  • Thread starter Thread starter Thomas
  • Start date Start date
T

Thomas

I am trying to access the members of an Exchange 5.5
Distribution List. I can get a list of all the Distribution
Lists, but I cannot see how to get the members. Can someone
point me in the correct direction? Thanks.
 
Thomas said:
I am trying to access the members of an Exchange 5.5
Distribution List. I can get a list of all the Distribution
Lists, but I cannot see how to get the members. Can someone
point me in the correct direction? Thanks.

using sds=System.DirectoryServices;
using debug=System.Diagnostics.Debug;

sds.DirectoryEntry mlist=new sds.DirectoryEntry(AdsPathToMailingList);
sds.PropertyValueCollection members=mlist.Properties["member"];
if (members!=null) {
foreach (string member in members)
debug.WriteLine(member);
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top