This project is read-only.

Idle on Office 365

Topics: Issues
Jul 10, 2016 at 10:01 AM
While my code receieves "Message arrived" notifications from gmail, it does not receieves those notifications from Office 365.
I followed this link and indeed I get true for client.Capabilities.Idle;

Could this be related to authentication?

Do you know if office 365 limits IMAP idle to OAuth authentication?

this is the code (igore the red underlines - it compiles and run):
public void Do(string username, string password)

        var client = new ImapClient(serverUrl, port, SslProtocols.Default, serverCertificate);
        client.Behavior.NoopIssueTimeout = 200;

        var connected = client.Connect();
        var loggedIn = client.Login(username, password);

        var supportsIdle = client.Capabilities.Idle;
        var inbox = client.Folders.Inbox;

        Console.WriteLine("set listining on message arrived");
        inbox.OnNewMessagesArrived += Folder_OnNewMessagesArrived;
        inbox.StartIdling(); ;

        Console.WriteLine("Start listen to message arrived notification");

        while (true)
        { }
        var msgs = inbox.Messages;


    void Folder_OnNewMessagesArrived(object sender, IdleEventArgs e)

            foreach (var message in e.Messages)

        // New messages arrived
        // e.Folder: The folder in which the messages have arrived
        // e.Messages: The new messages
Aug 4, 2016 at 9:03 AM
Hi YoYoRnd,

please provide a log file as described in


Pavel Azanov