Hi,
I have a folder named "Not Correct" In my mailbox.
When I use aspose to move item from my inbox to this folder I have an exception.
Codes:
ExchangeClient client = new ExchangeClient("http://..../exchange/userName",MyNetworkCredential);
ExchangeFolderInfo fInfo;
if (client.FolderExists(client.MailboxInfo.RootUri, "Not Correct", out fInfo))
{
strFolderUri = fInfo.Uri;
}
foreach (ExchangeMessageInfo msgInfo in client.ListMessages("http://..../exchange/userName/Inbox",
100,
ExchangeListMessagesOptions.None))
{
client.MoveItem(msgInfo.UniqueUri,strFolderUri + Guid.NewGuid().ToString() + ".eml")
}
WorkAround:
Replace client.MoveItem(msgInfo.UniqueUri,strFolderUri + Guid.NewGuid().ToString() + ".eml")
with client.MoveItem(msgInfo.UniqueUri, Uri.UnescapeDataString(strFolderUri) + Guid.NewGuid().ToString() + ".eml")