I have a problem connecting to Office 365 using Imap and MailKit. The exception I get is The remote certificate is invalid according to the validation procedure
https://github.com/jstedfast/MailKit
Code:
imapClient = new ImapClient();
imapClient.Connect("outlook.office365.com", 993, true);
According to the documentation I can set the client to accept all certificates but I do not wan't to do this.
// For demo-purposes, accept all SSL certificates
imapClient.ServerCertificateValidationCallback = (s,c,h,e) => true;
Microsoft Office 365 settings should be correct:
Has anyone else experienced this and solved it?