Sicos1977 / MsgKit

A .NET library to make MSG files without the need for Outlook
206 stars 56 forks source link

Adding categories to msg file #116

Closed sharpenednoodles closed 1 year ago

sharpenednoodles commented 1 year ago

Hi Sicos1977,

First off - fantastic library, nicely written, seems to do pretty much everything I need.

Now, I may have missed it, but is there anyway to add Categories or Follow up flags to an Email object?

I've noticed there's an AddProperty method for various MAPI tags, but I couldn't work out which one I'd need to add either category information, or follow up flags.

Any help would be greatly appreciated!

Sicos1977 commented 1 year ago

I checked the code but it seems I didn't implement adding categories. But a category is nothing more then a string that needs to be added to a specific MAPI property so I'm always open for some one to implement it and sent me a pull request.

You can see in MSGReader how it is read so to implement it you just need to do it the other way around.

https://github.com/Sicos1977/MSGReader/blob/42d76a5f8140cc098f1d0be254723e5852db2351/MsgReaderCore/Outlook/Message.cs#L1227