Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Outlook API邮件启用vs邮箱用户_Api_Outlook_Exchange Server - Fatal编程技术网

Outlook API邮件启用vs邮箱用户

Outlook API邮件启用vs邮箱用户,api,outlook,exchange-server,Api,Outlook,Exchange Server,这是一个非常微妙的问题,可能与环境有关。我正在尝试使用Outlook 2010 API区分邮箱用户和启用邮件的用户。在Notes到Exchange迁移期间,我们正在使用Dell Quest迁移工具,这是一个流动的项目。仍处于原型阶段,因此使用VB宏最终将以C#交付 上周,我使用了检查“myRecipient.AddressEntry.AddressEntryUserType olExchangeUserAddressEntry”,其中myRecipient是myItem.Recipients列表

这是一个非常微妙的问题,可能与环境有关。我正在尝试使用Outlook 2010 API区分邮箱用户和启用邮件的用户。在Notes到Exchange迁移期间,我们正在使用Dell Quest迁移工具,这是一个流动的项目。仍处于原型阶段,因此使用VB宏最终将以C#交付

上周,我使用了检查“myRecipient.AddressEntry.AddressEntryUserType olExchangeUserAddressEntry”,其中myRecipient是myItem.Recipients列表的一部分,其中myItem是从电子邮件项目的ActiveInspector.CurrentItem检索的。据推测,共存人员对Active Directory复制进行了一些更改,现在每个人都显示为Exchange用户,甚至是未迁移到Exchange的用户。Microsoft文档似乎说olExchangeUserAddressEntry意味着“用户在GAL中”

在Outlook 2010 GAL UI(单击“收件人”按钮后选择收件人时)中,我看到了有关启用邮件用户与邮箱用户的可视指标。启用邮件的用户在图标中有一个地球仪。邮箱用户没有。知道我需要访问什么属性才能在迁移环境中区分邮箱用户和启用邮件的用户吗

我想了解outlookapi,但想知道这对于这个查询是如何实现的,或者是否需要添加adapi

谢谢,
Jason

使用
PR\u显示类型
(DASL名称
http://schemas.microsoft.com/mapi/proptag/0x39000003
)属性。启用邮箱的用户是
DT\u MAILUSER
(0)与
DT\u REMOTE\u MAILUSER
(6)。可以使用AddressEntry.PropertyAccessor.GetProperty访问该属性


查看使用的GAL对象(单击IAddrBook、OpenRootComtainer | GetHierarchyTable等)

希望我遵循协议,但很难在以前的帖子中添加评论。德米特里的建议一针见血

当前代码:

For Each myRecipient In myItem.Recipients
     'Simple "Exchange User" interrogation worked last Thursday
            Dim test1 As Boolean
            test1 = myRecipient.AddressEntry.AddressEntryUserType <> olExchangeUserAddressEntry

            Dim test2 As Boolean
            Dim myAccessor As PropertyAccessor
            Set myAccessor = myRecipient.PropertyAccessor
            If Not test1 Then
                myDisplayType = myAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x39000003")
                test2 = myDisplayType <> 0 'Not an Exchange user
            Else
                test2 = False
            End If
myItem.Recipients中每个myRecipient的

上周四,简单的“交换用户”审讯成功了
将test1设置为布尔值
test1=myRecipient.AddressEntry.AddressEntryUserType olExchangeUserAddressEntry
将test2设置为布尔值
Dim myAccessor作为属性Accessor
设置myAccessor=myRecipient.PropertyAccessor
如果不是test1,那么
myDisplayType=myAccessor.GetProperty(“http://schemas.microsoft.com/mapi/proptag/0x39000003")
test2=myDisplayType 0'不是Exchange用户
其他的
test2=False
如果结束
试图找到更好的常数来测试myDisplayType,但现在已经足够好了。谢谢,德米特里。你表现得很专业

问候,, 杰森