• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaMail API IMAP Provider copyMessages

David Schaefgen
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok here it goes-

I'm working on a javaMail project and need to be able to copy messages from one folder to another based on their content. The messages are not sequential so the simplest way to pass them back and forth is on at a time. However every time the copyMessages() command runs I recieve the following message:
javax.mail.MessagingException: A4 NO COPY failed: Sequence invalid;
nested exception is:
com.sun.mail.iap.CommandFailedException: A4 NO COPY failed: Sequence invalid
This is somewhat annoying as I can find no documentation of what this means in the IMAP standards or the JavaMail Documentation. What is occuring is one "agent" checks the inbox for new messages, when it finds them it ships them off through an event to the filter "agent", which calls getContent() on the message and then uses that content to filter the text portions for words or phrases contained in its rule databases. Once it decides on a location it is sent to the appropriate manager "agent" via an event which in turn copy's the messages from its mailbox to whatever mailbox the event tells it too. The problem occurs when the copyMessages() command is called and it is failing at the server due to some sort of sequence error. Any help would be greatly appreciated.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic