简体   繁体   English

与ews-java-api中的IMAP标志类似的属性

[英]Properties analogous to IMAP flags in ews-java-api

I am working on application, which need to be refactored from using Java Mail API (with IMAP) to Exchange Web Services (EWS). 我正在开发应用程序,需要将其从使用Java Mail API(与IMAP)重构为Exchange Web服务(EWS)。 I decided to use ews-java-api. 我决定使用ews-java-api。 To recreate existing business logic, I need to use some kind of equivalent for IMAP flags, precisely: Answered, Recent and Seen. 要重新创建现有的业务逻辑,我需要对IMAP标志使用某种等效项,准确地说是:已回答,最近和可见。

So far I found discussions, which outcome was to use MAPI properties - at least for answered flag, but there were suggestions to use PR_LAST_VERB_EXECUTED property, which seems not to be enough information for me. 到目前为止,我发现了一些讨论,讨论的结果是使用MAPI属性-至少用于已回答标志,但是有人建议使用PR_LAST_VERB_EXECUTED属性,这对于我来说似乎还不够。 Do anyone knows is this possible to get such information from this API library/MAPI at all? 有谁知道完全有可能从此API库/ MAPI获取此类信息吗?

I pulled a list of IMAP flags from this question. 我从这个问题中提取了IMAP标志列表

Mostly, it's a matter of working out which MAPI properties store the information you're looking for. 通常,要弄清楚哪些MAPI属性存储您要查找的信息。 A great place to figure this out is by looking at messages in MFCMAPI , paying special attention to PT_LONG properties which have flag values. 解决这个问题的一个好地方是查看MFCMAPI中的消息,特别注意具有标志值的PT_LONG属性。

I mapped a few for you: 我为您绘制了一些:

Recent is weird. 最近很奇怪。 If you're interested in knowing about messages that have arrived recently, you might want to look at EWS Sync . 如果您想了解最近收到的消息,则可以查看EWS Sync

I have had to deal with this exact same issue and can tell you that there is no definitive way in MAPI to tell if a message has been answered or not. 我不得不处理这个完全相同的问题,并且可以告诉您,MAPI中没有确定的方法来判断消息是否已答复。 It happens that MAPI does define a message flag that is documented as marking a message that has been answered but it is not used. 碰巧MAPI确实定义了一个消息标志,该标志被记录为标记已答复但未使用的消息。 The best way I know of is to examine the Outlook icon associated with the message, that is property PR_ICON_INDEX. 我所知道的最好方法是检查与邮件关联的Outlook图标,即属性PR_ICON_INDEX。 In many instances when a message has been answered this will tell you but, for several reasons, it is not a reliable indicator in all cases. 在许多情况下,如果回答了一条消息,则会告诉您,但由于多种原因,它并不是在所有情况下都是可靠的指示。 The primary reason is that, if something else was done with the message after it was answered, for example it was forwarded, then the icon will indicate only the latter operation. 主要原因是,如果在答复消息后对消息做了其他处理(例如转发),则该图标将仅指示后者的操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM