I've tried in numerous ways to get this working. I have a ton of emails I'm downloading and I only want the header information for now because I need to do some statistics aggregation and preprocessing on the data.
I'm able to download the emails and I save the ImapMessageInfo object to disk by serializing it as a Json object with the Newtonsoft.Json library.
When I try to deserialize the file, I get a variety of errors, depending on the specifics of what I do. The vast majority of the errors point to the fact that you can't instantiate a number of the objects because they have internal constructors. As the classes are also sealed, I can't inherit from them and add my own constructor.
How do I get around this so I can store and deserialize these objects? I can see them fine on disk. I just can't load them.