0

I have a requirement in my web application to all show particular page to people who are member of particular DL.

kindly help me on the below code i'm not able to assign dl mail addesser.

private void GetDistributionListMembers()
        {            
            string test = "test@mail.com";            

                Outlook.AddressEntry addrEntry == ???


                    Outlook.ExchangeDistributionList exchDL =  addrEntry.GetExchangeDistributionList();
                    Outlook.AddressEntries addrEntries =  exchDL.GetExchangeDistributionListMembers();
                    if (addrEntries != null)
                        foreach (Outlook.AddressEntry exchDLMember
                            in addrEntries)
                        {
                            //Debug.WriteLine(exchDLMember.Name);
                        }                
            }
        }
Suresh Savage
  • 425
  • 2
  • 7
  • 16

1 Answers1

1

Call Namespace.ResolveName, (returns Recipient object), call Recipient.Resolve, use Recipient.AddressEntry property.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
  • Thanks i have used this technique for this requirement... http://stackoverflow.com/questions/7168361/determine-if-user-is-in-ad-group-for-net-4-0-application – Suresh Savage Feb 28 '14 at 05:36