【发布时间】:2012-04-05 08:46:23
【问题描述】:
我尝试通过以下方法确认电子邮件地址是否是有效的 Lync 用户,但没有给出正确的结果。
LyncClient client = LyncClient.GetClient();
Contact contact = client.ContactManager.GetContactByUri("xxx@xxx.com");
方法一:
if(contact.UnifiedCommunicationType == UnifiedCommunicationType.Enabled)
{
}
else if(contact.UnifiedCommunicationType == UnifiedCommunicationType.NotEnabled)
{
}
else if(contact.UnifiedCommunicationType == UnifiedCommunicationType.Unknown)
{
}
在这种方法中,我得到随机电子邮件地址的未知和有效 Lync 用户的 NotEnabled。但是,我没有得到“无效”。
方法二:
ContactType contact_type = (ContactType)contact.GetContactInfomration(ContactInformationType.ContactType);
if(contact_type == ContactType.Person)
{
}
else if(contact_type == ContactType.Invalid)
{
}
else if(contact_type == ContactType.Unknown)
{
}
在这种方法中,无论电子邮件地址如何,我都会得到“Person”。因此,我不认为这是这种方式。
您能告诉我如何实现这一目标吗?
注意:我要做的就是检查传入电子邮件的发件人是否在 outlook 是否是有效的 lync 用户。
【问题讨论】: