users@javamail.java.net

got a MessagingException -> parse error: invalid message sequence number

From: <xoot123_at_yahoo.it>
Date: Tue, 7 Jan 2014 16:14:08 +0000 (GMT)

Hello,
I'm getting a javax.mail.MessagingException: A258 BAD parse error: invalid message sequence number: 24.

I found that one possible execution path in our code that leads to this exception is when I edit a draft with attachments, delete the original draft, and then save the edited draft (so that the original draft doesn't exist anymore, but I have all the informations about it in our application composition pane).
This only happens with drafts with attachments, it seems that a reference to the original message number is cached by JavaMail, despite the fact that the server supports UIDs - and IMHO the original message isn't needed anymore).
I have no idea if this is a bug, but if I do the same steps with i.e. Thunderbird, no error occurs and the edited draft is correctly saved.

As the application I'm working on is very big, I can't provide a small example, nor I can ensure this is our own code fault.
I'm writing here in the hope that you'll be able to tell me whether this is a bug or not, so I
 can narrow down the possible causes (there's another source of that exception in our code that I'm not yet able to replicate).



Thanks in advance.

M. R.