Subject: "The specified message set is invalid (NO)" Exception when trying to move Messages through IMAP
Date: 2011-11-07 13:15:54
From: Michael Randrup
Source: specified-message-set-invalid-no-exception-trying-move-messages-imap


I am using your BounceInspector component, but I am running into some irratic behaviour, when I try to move the MailMessages using the IMAPClient.

First I am processing all the messages I get back in the Bounce Result collection and collecting all the Sequence ID's I Want to move, on two lists - 1 list of identified messages, and 1 list of non-identified messages.

Then I Call the overload of the MoveMessage() that takes a MessageSet:

set = new ImapMessageIdSet(MoveToIdentified.ToArray());
client.MoveMessage(set, IdentifiedMailBox);

"MoveToIdentified" is a List<int> Which contains all the Sequence ID's. But I keep getting this exception:ComponentPro.Net.Mail.ImapException: The specified message set is invalid (NO).

I have also tried to move the messages one by one during processing - but gets the same error. Some messages gets moved and some does not. I have not yet seen a particular pattern to the error.

I have also tried to move the messages, using the unique ID (result.MailMessage.MessageId), but that Method throws an "Invalid Parameter" exception on every message.

I have full access on the Folders I am connecting to (my own MailBox), and I am connecting to an Exchange Server.

Am I missing something here?

Hope you can help me out!

Kind Regards,

---------------------------------------------------------------------- Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor who sold you the license and ask for your money back. Back to ComponentPro Q&A Forum Index