I'd like to create mirror a deep folder structure to a destination IMAP mailbox. It's illegal to create the child deep folder directly so it seems I need to create it in a manner similar to this: Add Imap Folder Mailkit
My C# is limited so I'm trying to figure out how I can make use of 'HasChildren' IMailFolder attributes to loop through all folders and maintain the reference to the parent folder when creating the folders.
Hope that makes sense!
I'm doing this which works to create the toplevel always but I don't know how to build the logic :
var toplevel = ExchangeConnection.GetFolder(ExchangeConnection.PersonalNamespaces[0]);
string foldertocreate = UserSharedBox.FullName.Replace('.', '/').Replace((string.Format("{0}/{1}", "user", sharedmailbox)), "").Replace("/","");
var CreationFolder = toplevel.Create( foldertocreate,true);
Thanks