Sample code for 30+ languages & platforms
Node.js

Transition from Imap.GetSslServerCert to Imap.GetServerCert

Provides instructions for replacing deprecated GetSslServerCert method calls with GetServerCert.

Chilkat Node.js Downloads

Node.js
NODEJS_PRELUDE

function chilkatExample() {

    var success = false;

    var imap = new chilkat.Imap();

    //  ...
    //  ...

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

    // certObj: Cert
    var certObj = imap.GetSslServerCert();
    if (imap.LastMethodSuccess == false) {
        console.log(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.

    var cert = new chilkat.Cert();
    success = imap.GetServerCert(cert);
    if (success == false) {
        console.log(imap.LastErrorText);
        return;
    }


}

chilkatExample();