Have you tested in a TLS Encrypted connection?

Topics: Feature Requests
Aug 17, 2012 at 9:33 PM

Hi, I am using imapx 2 in a project that need to retrieve mails from diverse mail sources, I have tested it against a gmail, yahoo and outlook (without TLS) connections and it have worked pretty fine, but i can't connect to Office 365 or outlook connections that has TLS, have any Ideas to do it?

Aug 18, 2012 at 5:56 PM


glad to hear you use ImapX in a quite big environment. We didn't test the library with TLS yet, but SSL is fully supported.

As far as I know, Office365 uses SSL for IMAP, not TLS. And I could also connect to an account created on Office365 without any problems using the following code:

//set the third parameter to true in order to use SSL
var client = new ImapClient("pod51015.outlook.com", 993, true);
client.LogIn("*****@*****.onmicrosoft.com", "*****");

Hope this helps.

In case of TLS: We'll try to check on that and update the code to add TLS support.


Aug 18, 2012 at 6:17 PM


I extended the constructor of ImapClient with an optional parameter which now allows you to choose the SSL protocol and set it to TLS:

using System.Security.Authentication;


var client = new ImapClient("pod51015.outlook.com", 993, true, SslProtocols.Tls);

It would be great if you can test if this works for you and give feedback!