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

Free Support Forum - aspose.com

ImapClient.AppendMessage throws an Exception when using a folder with a space in the name

I am trying to use the method to append a message to the "Sent Items" folder. When I do this the following exception occurs:

Aspose.Network.Imap.ImapException "+ Ready for additional command text."

For reference, this only occurs for folders with space in the name, other folders, such as the Inbox work fine. I am connecting to an Exchange 2007 server.

Hi,


This issue has been fixed and will be included in the coming release.

The issues you have found earlier (filed as 18277) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

I am using the new Aspose.Network component and I still get the same error. Nothing was fixed. This issue is now critical. How can we resolve this?

Hi,


Could you please make sure that the reference in your project is updated to Aspose.Network dll version 5.5? I checked at my end with Exchange 2003/2007, local and Gmail using ImapClient and the message was appended successfully to the folder with space in it’s name.

Sample code that I used:

client = new ImapClient(“ex07sp1”, 993, @“litwareinc\bob”, “Evaluation1”, RemoteCertificateValidationHandler);
client.EnableSsl = true;
client.SecurityMode = ImapSslSecurityMode.Implicit;
client.Connect(true);
Console.WriteLine(“Connected to IMAP server.”);

client.AppendMessage(“Sent Items”, new MailMessage("from@domain.com", "to@domain.com", “added using Aspose.Network”, “test message”));
Console.WriteLine(“Message appended. Please check the Sent Items folder in Outlook/OWA”);

private static bool RemoteCertificateValidationHandler(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
{
return true; //ignore the checks and go ahead
}

[Edit]: The above code snippet would work with an Exchange 2007 server with SSL and Imap enabled.

Hi,

Yes, your sample code did work. I was using the SelectFolder and SubscribeFolder methods before the Append, and those seemed to cause the exception. Removing them did the trick. Thanks!