Hi jabirst,
After the STARTTLS Command, you have to switch to an SslStream. I post the snipped here, that may help you.
Best regards,
Michael
After the STARTTLS Command, you have to switch to an SslStream. I post the snipped here, that may help you.
IList<string> data=new List<string>();
if (SendAndReceive(ImapCommands.StartTLS, ref data))
{
_ioStream = new SslStream(_client.GetStream(), false, CertificateValidationCallback, null);
(_ioStream as SslStream).AuthenticateAsClient(_host, null, SslProtocols.Tls, false);
_streamReader = new StreamReader(_ioStream);
// update capabilities
Capability();
}
I hope, this helps. Let me know, if you have further questions.Best regards,
Michael