How do I convert between an Aspose ExchangeMessageInfo.MessageId and a Microsoft.Exchange.WebServices.Data.ItemId
internal void go()
{
ExchangeMessageInfoCollection messages = this.getInboxMessages();
foreach (ExchangeMessageInfo message in messages)
{
MapiRecipientCollection recipients = getMessageRecipients(message);
foreach (MapiRecipient recipient in recipients)
{
string recipientEmailAddress = getRecipientSmtpAddress(recipient);
log(recipientEmailAddress);
}
List itemids = new List();
itemids.Add(new ItemId(message.MessageId));
ServiceResponseCollection response = client_ms.MoveItems(itemids, getFolderIdEnsured("#Errors"));
}
}
as you can see I’m trying to use Microsoft.Exchange.WebServices to move a mail item to a subfolder.
I know that the subfolder id is the correct format for the microst client.
When I try to use MessageId property for an Aspose ExchangeMessageInfo as the itemId for Microsoft’s move operation, EWS responds with: Error, the item id is malformed!