Hello folks,
I think that there is a small bug in the POP3 funtion of Net library, or at least in the sample code.
The problem happens when you try to retrieve messages from an inbox that has more than 20 messages. The sample code calls pop.DownloadMessage(Messages.GetKeyAt(i), False) for every message, and that causes more than 20 threads to run simultaneously, so you get this error:
java.util.concurrent.RejectedExecutionException
That happens because the POP_DownloadCompleted event is not being fired fast enough. If you try the same code with an inbox that has 20 messages or less then everything works.
Of course, a possible workaround would be to ask for the 1st message, wait for the download to complete, then ask for the 2nd message, etc.
Thanks!
Joe
I think that there is a small bug in the POP3 funtion of Net library, or at least in the sample code.
The problem happens when you try to retrieve messages from an inbox that has more than 20 messages. The sample code calls pop.DownloadMessage(Messages.GetKeyAt(i), False) for every message, and that causes more than 20 threads to run simultaneously, so you get this error:
java.util.concurrent.RejectedExecutionException
That happens because the POP_DownloadCompleted event is not being fired fast enough. If you try the same code with an inbox that has 20 messages or less then everything works.
Of course, a possible workaround would be to ask for the 1st message, wait for the download to complete, then ask for the 2nd message, etc.
Thanks!
Joe