IMAP to Gmail?

Nov 24, 2010 at 6:36 AM

Just tried this:

		private void button1_Click(object sender, RoutedEventArgs e)
		{
			var client = new Imap4Client();
			var hmm = client.Connect("imap.gmail.com", 995, "my email", "my password");
			var mailBoxes = client.GetMailboxes("", "");

		}

Got an exception on line 2 ("hmm = "), apparently hitting a null ref somewhere in the connect code. Any ideas?

-mt

Nov 30, 2010 at 4:05 PM

You must use ConnectSSL instead of Connect.

Also the port number is 993 for IMAP.

http://mail.google.com/support/bin/answer.py?hl=en&answer=77661

 

Feb 3, 2011 at 12:43 PM

If I am using the Compact version of the component, ConnectSSL is not available.

Is there a reason for this?

Cheers