none
[E2010][EWSMA][C#] Get the e-mail addresses for a distribution list RRS feed

  • Question

  • How can I ask Exchange 2010 which e-mail addresses belong to a distribution list using EWS Managed API 1.1?

     

    Thank you,

    Tedderz

    Monday, July 18, 2011 12:57 PM

Answers

All replies

  • Hi,

    do you mean a distribution list (aka ContactGroup) stored in an Exchange folder?

    Given the unique id of a distribution list, you can use this code:

    var item = (ContactGroup) Item.Bind(service, uniqueId);
    foreach (var member in item.Members)
    {
       Console.Out.WriteLine("member.AddressInformation = {0}", member.AddressInformation);
    }

    Kind regards,
    Henning

    "Tedderz" wrote in message news:931caee5-140b-4d38-89b5-3c4f1e24c118@communitybridge.codeplex.com...

    How can I ask Exchange 2010 which e-mail addresses belong to a distribution list using EWS Managed API 1.1?

    Thank you,

    Tedderz

    Monday, July 18, 2011 5:18 PM
  • Okay, I believe ExchangeService.ExpandGroup() will do what I need.
    • Marked as answer by Tedderz Wednesday, July 20, 2011 5:35 PM
    Monday, July 18, 2011 9:00 PM