stackoverflow exception in imap4client.cs

Jul 25, 2011 at 1:42 PM
Edited Jul 25, 2011 at 1:45 PM
Hi,

I'm trying to connect to ymail over imap. 
this is my code:
imap = new Imap4Client();
imap.ConnectSsl("imap.mail.yahoo.com", 993);
imap.Login(myusername, mypassword);
				
after the Login function takes a minute or so I get "An unhandled exception of type 'System.StackOverflowException' occurred in System.dll"
with the following line 1057 in Imap4Client.cs highlighted:
  this._sslStream.Write(System.Text.Encoding.ASCII.GetBytes(stamp + ((stamp.Length > 0) ? " " : "") + command + "\r\n\r\n"), 0, stamp.Length + ((stamp.Length > 0) ? 1 : 0) + command.Length + 2);

Any ideas why and how to solve this? I'm using the latest version of the code (61381) and have changed the properties of the projects to use .net 4 and not .net 2.

Best,
gregor