Sample code for 30+ languages & platforms
Node.js

Transition from MailMan.LoadXmlFile to EmailBundle.LoadXml

Provides instructions for replacing deprecated LoadXmlFile method calls with EmailBundle.LoadXml.

Chilkat Node.js Downloads

Node.js
NODEJS_PRELUDE

function chilkatExample() {

    var success = false;

    var mailman = new chilkat.MailMan();

    //  ...
    //  ...

    var filePath = "c:/example/emailBundle.xml";

    //  ------------------------------------------------------------------------
    //  The LoadXmlFile method is deprecated:

    // bundleObj: EmailBundle
    var bundleObj = mailman.LoadXmlFile(filePath);
    if (mailman.LastMethodSuccess == false) {
        console.log(mailman.LastErrorText);
        return;
    }

    //  ...
    //  ...

    //  ------------------------------------------------------------------------
    //  Do the equivalent using EmailBundle.LoadXml.

    var bundle = new chilkat.EmailBundle();
    success = bundle.LoadXml(filePath);
    if (success == false) {
        console.log(bundle.LastErrorText);
        return;
    }


}

chilkatExample();