1
Vote

Create & Delete Folder Hangs

description

The command string for the Create() & Delete() methods in ImapCommand.cs seem to be missing the line breaks that indicate the end of a command.

Create is:
Connection.Write(string.Format("CREATE {0}", name));
Should be:
Connection.Write(string.Format("CREATE {0} \r\n", name));

Delete is:
Connection.Write(string.Format("DELETE {0}", name));
Should be:
Connection.Write(string.Format("DELETE {0} \r\n", name));

comments

pechkin wrote Apr 25, 2010 at 1:46 PM

Actually it should be

Connection.Write(string.Format("CREATE {0}\r\n", name));

without space before .

yushir wrote Sep 1, 2011 at 2:42 PM

It should be noted that Mailbox (folder) names with special characters should be encoded as Imap version of UTF7 as specified on RFC 2060(http://www.faqs.org/rfcs/rfc2060.html). I still haven't found an algorithm on .NET that does it (but it should be portable, there are some on CPAN).