Sample code for 30+ languages & platforms
Node.js

Transition from MailMan.FetchMultipleHeaders to MailMan.FetchUidlSet

Provides instructions for replacing deprecated FetchMultipleHeaders method calls with FetchUidlSet.

Chilkat Node.js Downloads

Node.js
NODEJS_PRELUDE

function chilkatExample() {

    var success = false;

    var mailman = new chilkat.MailMan();

    //  ...
    //  ...

    var saUidls = new chilkat.StringArray();
    saUidls.Append("aaa");
    saUidls.Append("bbb");
    saUidls.Append("ccc");

    var stUidls = new chilkat.StringTable();
    stUidls.Append("aaa");
    stUidls.Append("bbb");
    stUidls.Append("ccc");

    var numBodyLines = 5;

    //  ------------------------------------------------------------------------
    //  The FetchMultipleHeaders method is deprecated:

    // bundleObj: EmailBundle
    var bundleObj = mailman.FetchMultipleHeaders(saUidls,numBodyLines);
    if (mailman.LastMethodSuccess == false) {
        console.log(mailman.LastErrorText);
        return;
    }

    //  ...
    //  ...

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

    var headersOnly = true;

    var bundleOut = new chilkat.EmailBundle();
    success = mailman.FetchUidlSet(stUidls,headersOnly,numBodyLines,bundleOut);
    if (success == false) {
        console.log(mailman.LastErrorText);
        return;
    }


}

chilkatExample();