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

Free Support Forum - aspose.com

Imap getmessages issue

Hi Team,

I am using the following code for getting the messages from Imap

ImapClient imapclient = null;

int startindex=0;

ImapPageInfo coll = imapclient.listMessagesByPage(100,startindex);

Now, In this folder there are total 9 messages , now when I use the following code

coll = imapclient.listMessagesByPage(100,startindex);

It gives me 1(one) record, I check the same even my startindex is 1 , 2 or anything

System.out.println("SIZE:- " + coll.getItems().getIList().size());

Please provide me the solution of getting messages from particular folder using Imap

Thanks and Regards,

Ajay Kumar


Thank you for writing to us.

For reading messages from specific folder, please use the code sample given at this link:

By following the code sample at this link you can read all folders.

Moreover, please feel free to write back to us if you need additional information in this regard.