我的网络应用程序中要求所有人都向特定DL成员显示特定页面。
请帮我解决下面的代码,我无法分配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);
}
}
}
答案 0 :(得分:1)
调用Namespace.ResolveName,(返回Recipient对象),调用Recipient.Resolve,使用Recipient.AddressEntry属性。