Sample code for 30+ languages & platforms
C#

Transition from Imap.GetSslServerCert to Imap.GetServerCert

Provides instructions for replacing deprecated GetSslServerCert method calls with GetServerCert.

Chilkat C# Downloads

C#
bool success = false;

Chilkat.Imap imap = new Chilkat.Imap();

// ...
// ...

// ------------------------------------------------------------------------
// The GetSslServerCert method is deprecated:

Chilkat.Cert certObj = imap.GetSslServerCert();
if (imap.LastMethodSuccess == false) {
    Debug.WriteLine(imap.LastErrorText);
    return;
}

// ...
// ...

// ------------------------------------------------------------------------
// Do the equivalent using GetServerCert.
// Your application creates a new, empty Cert object which is passed 
// in the last argument and filled upon success.

Chilkat.Cert cert = new Chilkat.Cert();
success = imap.GetServerCert(cert);
if (success == false) {
    Debug.WriteLine(imap.LastErrorText);
    return;
}