jstedfast/MailKit

in the sample project of imapidle, is it possible to add a sample method for how to cancel the "IDLE" mode. thanks!

kenizhou opened this issue · 2 comments

Thanks for your great works in advance!

I am doing a PoC on a mail client. and seeing how to support "IDLE" mode to show the coming emails notification ,flags change,...

I tested "ImapIdle", it is running perfect as the expected. but don't know how to exit the "IDLE" mode to serve a user request. Is there any the best practice for the following scenario:
The mail client is running in "IDLE" mode, then user want to Fetch and read an email. how to exit the "IDLE" mode and execute the "Fetch" immediately?

Thanks!

You just need to cancel the doneToken. It can literally be done anywhere in your code.

thanks