Sample code for 30+ languages & platforms
Node.js

Transition from MailMan.FetchSingleHeaderByUidl to MailMan.FetchByUidl

Provides instructions for replacing deprecated FetchSingleHeaderByUidl method calls with FetchByUidl.

Chilkat Node.js Downloads

Node.js
NODEJS_PRELUDE

function chilkatExample() {

    var success = false;

    var mailman = new chilkat.MailMan();

    //  ...
    //  ...

    var numBodyLines = 5;
    var uidl = "123";

    //  ------------------------------------------------------------------------
    //  The FetchSingleHeaderByUidl method is deprecated:

    // emailObj: Email
    var emailObj = mailman.FetchSingleHeaderByUidl(numBodyLines,uidl);
    if (mailman.LastMethodSuccess == false) {
        console.log(mailman.LastErrorText);
        return;
    }

    //  ...
    //  ...

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

    var headerOnly = true;

    var emailOut = new chilkat.Email();
    success = mailman.FetchByUidl(uidl,headerOnly,numBodyLines,emailOut);
    if (success == false) {
        console.log(mailman.LastErrorText);
        return;
    }


}

chilkatExample();