Set "Colored Flag" marker for MapiMessage


I’m currently trial testing your .NET based E-mail libraries to try and convert from Zimbra Mailboxes to PST (for later import into an exchange server).

Zimbra keeps all mail in eml format together with an meta file, which contains information like “read vs undread”, or whether an e-mail has been marked with those “red flags” within outlook.

Is there a way to set those colored (commonly red) flags for an MapiMessage? I’ve been searching through the MapiProperties, but couldn’t find what I needed.

Thanks for your advice,

Found out myself, for anyone else curious in the future:

mail.SetProperty(new MapiProperty(MapiPropertyTag.PR_FLAG_STATUS, BitConverter.GetBytes(2)));
mail.SetProperty(new MapiProperty(MapiPropertyTag.PR_FLAG_ICON, BitConverter.GetBytes(6)));

For status: PidTagFlagStatus Canonical Property | Microsoft Learn
For icon: PidTagFollowupIcon Canonical Property | Microsoft Learn

Hi Philipp,

Thank you for considering Aspose.Email.

You can also set the color category for an email message using the sample code as mentioned in our online documentation article i.e. [Setting Color Category ]( for Outlook MSG Files. You can also refer to our Programmer’s Guide section of our online documentation for further information about our product.