Aspose.Email StartMonitoring not working

Hi,

I’m working on implementing the IDLE feature of Imap… The StartMonitoring does not trigger the callback…
This is my basic implementation

var client = new ImapClient(“host”, 993, “user”, “pass”);

        client.SecurityOptions = Aspose.Email.Clients.SecurityOptions.Auto;

        _client.StartMonitoring(delegate (object sender, ImapMonitoringEventArgs e)
        {

            Console.Write(e.FolderName);
        });

The callback delegate is never called for new messages. No errors throw. I also tested the sample code from your documentation and its not working at all. Is there an open issue with this feature?

@eldridge,

We were unable to reproduce the issue that you reported. We used the code given below for testing.

ImapClient client = new ImapClient("imap.gmail.com", 993, "Email", "Password");
client.SecurityOptions = Aspose.Email.Clients.SecurityOptions.Auto;
client.StartMonitoring(delegate (object sender, ImapMonitoringEventArgs e)
{
    Console.Write(e.FolderName);
}); 

Please make sure that you are using the latest version of Aspose.Email for .NET API. Please feel free to contact us if additional information is required.

Thanks @muhammadahmad. I don’t know what happens but the same code I run now and its working.

1 Like

@eldridge,

We are happy to hear that your issue has been resolved. Please feel free to contact us if additional information is required. We will be more than happy to assist you further.