+1 vote
by (740 points)
edited by

I am getting an error when trying to retrieve an Email using Exchange Web Services.
I am getting a list of emails available with this;

var messageInfoList = mailBoxMonitor.ExchangeWS.GetMessageList(new     EwsFolderId(mailBoxMonitor.MailBoxSettings.Folder), EwsListFields.All, offset, chunkSize);

Then iterating through that list to retrieve each email with;

foreach (EwsMessageInfo thisMessageInfo in messageInfoList)
{
    MailMessage thisMessage = mailBoxMonitor.ExchangeWS.GetMailMessage(thisMessageInfo.ItemId);
}

But the GetMailMessage call is returning ErrorInvalidIdMalformed even though I'm simply passing on the ItemId returned from the list. It doesn't always do this, only for certain emails.

What am I doing wrong?

Applies to: Rebex Secure Mail

1 Answer

0 votes
by (15.2k points)
edited by

This bug has been fixed in the 2016 R1 version of Rebex Secure Mail that now officially supports Exchange Web Services on top of IMAP, POP3 and SMTP. See our blogpost for more details.

Hello, from the pieces of the code I would say that everything should work just fine. Please, create a log with LogLevel.Debug and send it back to us at support@rebex.net to analysis. You can set mailBoxMonitor.ExchangeWs.LogWriter property just before the GetMessageList call. It should contain plan SOAP requests and responses.
Without the log I can only say that some ID your Exchange server did not recognize as valid ID, so there is a possibility that we somehow destroyed the received ID. But to be sure we still need the log.

by (15.2k points)
edited by
The issue was resolved with newer beta build.
by (15.2k points)
The beta was released as 2016 R1 version of Rebex Secure Mail.
...