| Author |
Message |
Gary A. Bushey [SPS MVP]
Guest
|
Posted:
Fri Aug 19, 2005 3:38 pm Post subject:
Retrieve entries from mailing list |
|
|
I am looking for pointers on how to expand a mailing list into its
individual entries. C# would be preferred but if I need to use some other
language, I will. Thanks.
--
Gary A. Bushey
SPS MVP
bushey@mindspring.com
|
|
| Back to top |
|
 |
Henning Krause [MVP - Exc
Guest
|
Posted:
Fri Aug 19, 2005 5:00 pm Post subject:
Re: Retrieve entries from mailing list |
|
|
Hello,
I have an article on this topic on my website:
http://www.infinitec.de/exchange/howtos/exchangedistlist.aspx.
Greetings,
Henning Krause
MVP - Exchange
http://www.infinitec.de
"Gary A. Bushey [SPS MVP]" <bushey@mindspring.comNOSPAM> wrote in message
news:eV7PdoKpFHA.1480@TK2MSFTNGP10.phx.gbl...
| Quote: | I am looking for pointers on how to expand a mailing list into its
individual entries. C# would be preferred but if I need to use some other
language, I will. Thanks.
--
Gary A. Bushey
SPS MVP
bushey@mindspring.com
|
|
|
| Back to top |
|
 |
dln
Guest
|
Posted:
Fri Aug 19, 2005 5:00 pm Post subject:
Re: Retrieve entries from mailing list |
|
|
Assuming you have the distinguished name of the group...
void GetGroupMembers(string dn, SortedList memberList)
{
DirectoryEntry group = new DirectoryEntry("LDAP//:" + dn);
foreach (string member in group.Properties["member"] )
{
// each member of the group is returned as a distinguished name
// so if you need any member specifc info such as display name,
// its distinguished name, etc... you'll need to create a new
// directory entry referencing the member pulled from the list
DirectoryEntry member_de =
new DirectoryEntry("LDAP//:" + member);
// you might want to test if you have an imbedded group
if ( 0 == String.Compare("Group", member_de.SchemaClassName, true) )
{
GetGroupMembers(member, memberList);
}
else
{
memberList[member_de.Properites["cn"][0].ToString()] = null;
}
}
}
The code is just off the top of my head - I haven't actually compiled and
tested it, but I think it should work.
dln
"Gary A. Bushey [SPS MVP]" <bushey@mindspring.comNOSPAM> wrote in message
news:eV7PdoKpFHA.1480@TK2MSFTNGP10.phx.gbl...
| Quote: | I am looking for pointers on how to expand a mailing list into its
individual entries. C# would be preferred but if I need to use some other
language, I will. Thanks.
--
Gary A. Bushey
SPS MVP
bushey@mindspring.com
|
|
|
| Back to top |
|
 |
|
|
|
|