당신은이 디렉토리 밖으로 Mailadresses을받지 않습니다이 단지 구성 개체, 개체를 직접 :
이 지금까지 내 코드입니다. ,
DirectoryEntry de = new DirectoryEntry();
DirectorySearcher ds = new DirectorySearcher(de);
ds.PropertiesToLoad.Add("proxyAddresses");
ds.Filter = "(&(proxyAddresses=smtp:*))";
SearchResultCollection ss = ds.FindAll(); // count = 0
foreach (SearchResult sr in ss)
{// you might still need to filter out other addresstypes, ex: sip:
foreach (String addr in sr.Properties["proxyAddresses"])
Console.WriteLine(addr);
//or whithout the 'smtp:' prefix Console.WriteLine(addr.SubString(5));
}
특정 Exchange 주소 목록의 내용을 얻을하려는 경우 : 당신은 단순히 모든 Mailadresses 당신의 조직에서 당신은 단순히 다음과 같은 쿼리 수를 원한다면 (기본적으로 제한 ResultSize 선택이 있습니다) 당신은 당신의 필터를 수정하고, 예를 들어,이 목록의 'purportedSearch'-재산권의 가치로 교체 할 수 있습니다 : "기본 전체 주소 목록"에 대한 기본 필터는
(&(mailNickname=*)(|(objectClass=user)(objectClass=contact)(objectClass=msExchSystemMailbox)(objectClass=msExchDynamicDistributionList)(objectClass=group)(objectClass=publicFolder)))
합니다. 또는 (CN = 모든 전체 주소 목록, CN = 주소 목록 컨테이너, CN = 첫 번째 조직, CN = Microsoft Exchange, CN = 서비스, CN = 구성, DC = mydomain, DC = 로컬)에있는 모든 AddressBookContainer 개체를 enum 할 수 있습니다. ~ 각 'purportedSearch'- 속성을 사용하여 쿼리를 수행하십시오.