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

Free Support Forum - aspose.com

Error: "AE0004 BAD Command received in Invalid" on imapClient.DeleteMessage()


I’m getting Error: “AE0004 BAD Command received in Invalid” on imapClient.DeleteMessage()

Here is my code:

//Pass only the name of the license file embedded in the assembly

_log.Debug(“Connecting to Exchange Server 2007 using IMAP”);

ImapClient imapClient = new ImapClient(Properties.Settings.Default.Exchange_Host, Properties.Settings.Default.Exchange_Port, Properties.Settings.Default.Exchange_Username, Properties.Settings.Default.Exchange_Password);
imapClient.SecurityOptions = SecurityOptions.None;

ImapQueryBuilder builder = new ImapQueryBuilder();
ImapMessageInfoCollection msgCollection = imapClient.ListMessages(query);

MailQuery query = builder.GetQuery();
ImapMessageInfoCollection msgCollection = imapClient.ListMessages(query);

foreach (ImapMessageInfo msgInfo in msgCollection)
{ {

I’ve been struggling on this for awhile now… Any help will be greatly appreciated.

Update: Just figured it out

I forgot:


Hi Jason,

Thank you for posting your inquiry.

We have tested this issue at our end with ExchangeClient of the API and were not able to reproduce the issue. Can you please arrange a test account on your server and share its credentials with us? We shall check it at our end and assist you further.