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

Free Support Forum - aspose.com

Imapclient

hello i m using aspose 20.2 when i am getting message from a folder with 2000 or mail sometimes it hanges i m using this code

ImapMessageInfoCollection imapo = clientforimap_input.listMessages(iconnforimap_input, folderinfo.getName());

					lbl_progressreport.setText("Getting Folder " + pa1);
					MailConversionOptions option = new MailConversionOptions();
					pa = calendertime + "/" + username_p2 + "/" + Folder;

					clientforimap_output.createFolder(iconnforimap_output, pa);
					clientforimap_output.selectFolder(iconnforimap_output, pa);

					// System.out.println(Folder);

					// progressBar_message_p3.setStringPainted(true);

					// progressBar_message_p3.setValue(0);

					int messagesize;
					if (demo) {
						if (imapo.size() <= 50) {
							messagesize = imapo.size();
						} else {
							messagesize = 50;
						}

					} else {
						messagesize = imapo.size();
					}

					for (int i = 0; i < messagesize; i++) {

						try {

							if (stop) {
								break;
							}
							if ((i % 100) == 0) {
								System.gc();
							}

							ImapMessageInfo msgInfo = imapo.get_Item(i);

							MailMessage msg2 = clientforimap_input.fetchMessage(iconnforimap_input,
									msgInfo.getUniqueId());
							MapiMessage msg = MapiMessage.fromMailMessage(msg2,
									MapiConversionOptions.getUnicodeFormat());
							MailMessage msg1 = msg.toMailMessage(option);
							msub = msg2.getSubject();
							mid = msgInfo.getUniqueId();
							if (stop) {
								break;
							}

							// int count = 1;

							clientforimap_output.appendMessage(iconnforimap_output, pa,
											msg1);

}}}

@Harish2020,

I have observed the issue shared by you and request you to please try using latest Aspose.Email for .NET 20.4 on your end. In case there is still an issue then please share the working sample code along with test account credentials reproducing the issue on your end.

have licence till aspose 20.2 email

@Harish2020,

You can try that too and if the issue is still persisting, it has to be verified using Aspose.Email for .NET 20.4 and if that reproduced the issue then we will be able to log that in our issue tracking system. In that case, I would request you to please share the working sample project with test account credentials reproducing the issue. I will test that using 20.4 and will log that if latest version too reproduced it.