Bug 59100

Summary: Sent Date field is not extracted in message object when mail category set to RED
Product: POI Reporter: gopalkumar2
Component: POI OverallAssignee: POI Developers List <dev>
Status: NEW ---    
Severity: major    
Priority: P2    
Version: 3.14-dev   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: The sample outlook mail which you can use to reproduce the issue.

Description gopalkumar2 2016-03-02 14:11:25 UTC
Created attachment 33617 [details]
The sample outlook mail which you can use to reproduce the issue.

Sent Date filed is not extracted in message object when mail category set to RED.
Moreover, Please note that message is saved from sent folder and hence message header is not present. We tried several workaround like iterating thought all message properties but it seems that the sent date info is not populated in message object.
The sample outlook mail is attached which you can use to reproduce the issue.
Comment 1 Nick Burch 2016-03-02 14:38:48 UTC
I wonder if the date is stored in the fixed-sized properties block, rather than the variable one? What happens if you try checking in the MessagePropertiesChunk?
Comment 2 gopalkumar2 2016-03-03 08:30:25 UTC
I tried checking the date like below, but seems that sent date is not present 

<p>
Set<Map.Entry<MAPIProperty,List<PropertyValue>>> entry = message.getMainChunks().getProperties().entrySet();
for (Entry<MAPIProperty, List<PropertyValue>> en : entry) {
    String mapiProp = en.getKey().mapiProperty;
    if (mapiProp != null && mapiProp.contains("PR_CLIENT_SUBMIT_TIME")) {
        PropertyValue value = en.getValue().get(0); // 
        Object obj = value.getValue();
        Date date = ((GregorianCalendar)obj).getTime();
        result.put(bean.getDctmAttribute(), new DfTime(date));
        break;
    }
}
</P>