Sample code for 30+ languages & platforms
Node.js

Transition from MailMan.GetSmtpSslServerCert to MailMan.GetServerCert

Provides instructions for replacing deprecated GetSmtpSslServerCert method calls with GetServerCert.

Chilkat Node.js Downloads

Node.js
NODEJS_PRELUDE

function chilkatExample() {

    var success = false;

    var mailman = new chilkat.MailMan();

    //  ...
    //  ...

    //  ------------------------------------------------------------------------
    //  The GetSmtpSslServerCert method is deprecated:

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

    //  We want the SMTP email server certificate..
    var useSmtp = true;

    var certOut = new chilkat.Cert();
    success = mailman.GetServerCert(useSmtp,certOut);
    if (success == false) {
        console.log(mailman.LastErrorText);
        return;
    }


}

chilkatExample();