I'm creating an automation system which has a catchall mailbox and receives every non-existing email delivered to the mail server.
I then do some tasks based on some of these emails. But sometimes the message must be delivered to one of the existing mailboxes.
My question is, how can I, using the domain's admin account and IMAP protocol, move/copy these messages to the existing mailboxes using the MailKit library?
I think I have figured out this much that the IMAP's MOVE command which maps to ImapClient.Inbox.Move
in MailKit, is supposedly meant for this purpose, but what I can't figure out is, how to access the "Complete Hierarchy" namespace on IMAP to find the right user's Inbox folder?
NAMESPACE
extension may tell you some alternate hierarchies that you can inspect if your server supports it. – Max