We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

MSG file is not opening when setting the MapiPropertyTag.PR_FLAG_COMPLETE_TIME tag

Hi team,
I am converting eml file into msg I have addded the follow up flags for this I am using following code

if (f_ObjSysMail.FlagStatus == 1)
{
FollowUpManager.markAsCompleted(f_objMapiMessage);

MapiProperty f_objMapiProperty = new MapiProperty(MapiPropertyTag.PR_FLAG_COMPLETE_TIME,
f_ObjSysMail.FlagCompleted.toString().getBytes());
f_objMapiMessage.setProperty(f_objMapiProperty);
f_objMapiProperty = null;

}

when I am using the copleted flag and exporting the file then it is opening so please check this.

Hi team,
I am working on java and I am using for this aspose 18.6 jar.

@Rajmohammad,

Please share the f_ObjSysMail with us as to which object it refers to. We request you to share complete code sample with us in runnable form so that we can investigate the issue further in detail. Also, attach any input sample files that can help us reproduce the issue at our end.

Hi Kashif,
When I am setting the flag of

FollowUpManager.markAsCompleted(f_mapimessage);

It taking current date and time can you please help me for how to set the completed flag when exporting eml to pst in java.

And also I want to know can I set multiple MapiProperty in code. Because when I am using multiple mapiproperties then it effects the other property. Can you pleaes help me for that.
FlagSettingCurrentDate.zip (123.0 KB)

@Rajmohammad,

Marking message as complete functionality doesn’t work due to some reason. We have the issue logged as EMAILJAVA-34399 for further investigation at our end. This thread has also been linked with this ticket so that once the issue is resolved, you will be notified here accordingly.

Hi Kashif,
What is the progress in this issue? Does it solved?

@Rajmohammad,

Yes, this issue has been resolved. I have shared sample code with you.

MapiMessage mapi = MapiMessage.fromFile(“message.msg”);
// set message flag to read
mapi.setMessageFlags(MapiMessageFlags.MSGFLAG_READ);
// set “Follow up” flag
Date startDate = new Date();
FollowUpManager.setFlag(mapi, “Follow up”, startDate, startDate);
// complete
FollowUpManager.markAsCompleted(mapi);
mapi.save(“MarkedCompleted_out.msg”);