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);
}
 
Back
Top