ComponentPro UltimateBounceInspector

      CheckForUpdates(Int32) Method

      See AlsoMembers Options: Show AllLanguage Filter: AllSend comments on this topic to ComponentPro
      Sends NOOP or IDLE command to the server and checks for IMAP server notifications in the specified amount of time.


      public bool CheckForUpdates(
         int duration


      Duration of the idle interval, in miliseconds.

      Return Value

      If any new notifications were received, it returns true and Update event is fired; otherwise is false.


      The CheckForUpdates method is useful when you want to check for any possible updates including message deleted, message flags changed, etc. from the server. See ImapUpdateEvent for a list of supported notifications.

      Typically, a client application will call CheckForUpdates periodically while idle.

      This method represents IMAP NOOP or IDLE command. IDLE is used whenever the server supports this command. NOOP command is always used when the duration is less than 10 milliseconds.


      Shows how to handle Update event and use the Noop method to check for updates from the IMAP server.

      using System;
      using ComponentPro.Net;
      using ComponentPro.Net.Mail;
      static void Main()
          // IMAP server information. 
          const string serverName = "";
          const string user = "";
          const string password = "password";
          const int port = 993;
          const SslSecurityMode securityMode = SslSecurityMode.Implicit;
          // Create a new instance of the Imap class. 
          Imap client = new Imap();
          // Connect to the server. 
          client.Connect(serverName, port, securityMode);
          // Login to the server. 
          client.Authenticate(user, password);
          // Select 'INBOX' mailbox 
          client.Update += client_Update;
          // ... 
          while (!quit)
              // ... 
              // Wait for 10 seconds. 
              // ... 
          // ... 
          // Close the connection. 
      static void client_Update(object sender, ImapUpdateEventArgs e)
          switch (e.Event)
              case ImapUpdateEvent.MessageCount:
                  Console.WriteLine("New message received.");
                  // You can download the newly received message here. 
              case ImapUpdateEvent.MessageRemoved:
                  Console.WriteLine("One or more messages removed.");


      .NET Compact Framework.NET Compact Framework

      Supported version: 2.0, 3.5, and 3.9
      Assembly: ComponentPro.Mail.CF (in ComponentPro.Mail.CF.dll)

      .NET Framework.NET Framework

      Supported version: 2.0, 3.0, 3.5, 4.0, 4.5.x, 4.6.x and later
      Assembly: ComponentPro.Mail (in ComponentPro.Mail.dll)

      Xamarin AndroidXamarin Android

      Supported version: 2.3 and later
      Assembly: ComponentPro.Mail.Android (in ComponentPro.Mail.Android.dll)

      Xamarin MacXamarin Mac

      Supported version: 2.0.x and later
      Assembly: ComponentPro.Mail.Mac (in ComponentPro.Mail.Mac.dll)

      Xamarin iOSXamarin iOS

      Supported version: 5.1.x and later
      Assembly: ComponentPro.Mail.iOS (in ComponentPro.Mail.iOS.dll)

      See Also