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

Free Support Forum - aspose.com

IMAP StopMonitoring hanging when monitoring several subfolders

When I use the monitoring feature with several subfolders (not only inbox), then the app hangs when trying to stop monitoring the last registrated folder. Tried this with older dll version 16.xx and it worked. Doesn´t work with the actual library 18.5.xx.

Code snippet:
_imapClient = new Aspose.Email.Clients.Imap.ImapClient();

_imapClient.StartMonitoring(“INBOX”, delegate (object sender, ImapMonitoringEventArgs e) { … });
_imapClient.StartMonitoring(“INBOX.test”, delegate (object sender, ImapMonitoringEventArgs e) { … });
_imapClient.StartMonitoring(“INBOX.test2”, delegate (object sender, ImapMonitoringEventArgs e) { … });

_imapClient.StopMonitoring(“INBOX.test”);
_imapClient.StopMonitoring(“INBOX.test2”);
_imapClient.StopMonitoring(“INBOX”); --> hangs

Do you have any idea?
Thanks.

@SBWDeveloper,

Thank you for contacting Aspose support team.

I have tried this scenario using my test account having similar folder structure. No issue is observed and whole program runs successfully. Could you please send us a complete program having Aspose.Email code only which can be used to re-produce the scenario here? It will help us to observe the problem and provide assistance accordingly.