We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Folder fetch through imapclient

i am fetching through imap and on some folder i m getting this exception

ImapFolderInfoCollection folderinfoc = clientforgmail_input.listFolders(iconngmail_input);
try {
for (int j = 0; j < folderinfoc.size(); j++) {
try {
ImapFolderInfo folderinfo = folderinfoc.get_Item(j);
String folder = folderinfo.getName();


				ImapMessageInfoCollection imapo = clientforgmail_input.listMessages(folder);


ImapException: AE_1_1_2092 BAD [TRYCREATE] SELECT error - Folder does not exist or server encountered an error
at com.aspose.email.zek.a(SourceFile:113)
at com.aspose.email.zek.f(SourceFile:96)
at com.aspose.email.zayr.f(SourceFile:68)
at com.aspose.email.zacv.b(SourceFile:243)
at com.aspose.email.zee.a(SourceFile:336)
at com.aspose.email.zbdw.a(SourceFile:193)
at com.aspose.email.internal.ah.zd.a(SourceFile:65)
at com.aspose.email.internal.ah.ze.run(SourceFile:117)
at java.lang.Thread.run(Unknown Source)


I have observed the sample code and exception message shared by you. I suggest you to please try using latest Aspose.Email for Java 20.2. In case the issue is reproduced then please share the test account credentials with us that we may use to verify and resolve the issue in API.