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

Free Support Forum - aspose.com

Set "Colored Flag" marker for MapiMessage

Hi,


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,
Philipp

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: http://msdn.microsoft.com/en-us/library/cc842307.aspx
For icon: http://msdn.microsoft.com/en-us/library/cc815482(v=office.15).aspx

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.