How to enable ImapClient Activity Logging for Aspose email Java 17.8

Hi Aspose Team,

We observed that from one of the server when connecting to email to read emails
For the give label. we are getting the below exception, appreciate if more details on below
exception provided on in what cases it occurs.

com.aspose.email.TimeoutException: Connection failure. Timeout ‘100000’ has been reached.
at com.aspose.email.aai.a(SourceFile:255) ~[aspose-email-17.8.jar:17.8]
at com.aspose.email.hb.g(SourceFile:655) ~[aspose-email-17.8.jar:17.8]
at com.aspose.email.hb.B(SourceFile:587) ~[aspose-email-17.8.jar:17.8]
at com.aspose.email.hb.a(SourceFile:568) ~[aspose-email-17.8.jar:17.8]
at com.aspose.email.ImapClient.selectFolder(SourceFile:23020) ~[aspose-email-17.8.jar:17.8]
at com.aspose.email.ImapClient.selectFolder(SourceFile:23032) ~[aspose-email-17.8.jar:17.8]

So we want to print the debug logs of Aspose email to know more details on whats happening exactly because the same email and same code is working on the other server.

imapClient = new ImapClient(host ,port ,user, password,SecurityOptions.Auto);
imapClient.setConnectionTimeout(connectiontimeout);
imapClient.setTimeout(timeout);
imapClient.selectFolder(folder);

Above code we use to create Imapclient.

Thanks,
Kiran.

@hruser

We have logged a ticket as EMAILJAVA-35040 in our issue tracking system for your requirement.

We apologize for your inconvenience.

@tahir.manzoor Thank you for the ticket creation.

is there any work around to get to know what’s happening when connecting to Imap

Thanks,
Kiran.

@hruser

Unfortunately, there is no workaround available for this issue at the moment. We will investigate the issue and find the root cause of this issue. After that we will share a workaround with you if possible. Thanks for your patience.

Hi @tahir.manzoor

Thank you, waiting for your reply on the ticket once it done.

@hruser

You can use ImapClient.setLogFileName method to print IMAP debug logs as shown in following code snippet. Hope this helps you.

imapClient = new ImapClient(host ,port ,user, password,SecurityOptions.Auto);
imapClient.setLogFileName("log-path");
imapClient.setConnectionTimeout(connectiontimeout);
imapClient.setTimeout(timeout);
imapClient.selectFolder(folder);

@tahir.manzoor

Thank you , will try it out and see if we are able to print exception.