Node.js
Node.js
Transition from MailMan.GetAllHeaders to MailMan.FetchAll
Provides instructions for replacing deprecated GetAllHeaders method calls with FetchAll.Chilkat Node.js Downloads
NODEJS_PRELUDE
function chilkatExample() {
var success = false;
var mailman = new chilkat.MailMan();
// ...
// ...
var numBodyLines = 5;
// ------------------------------------------------------------------------
// The GetAllHeaders method is deprecated:
// bundleObj: EmailBundle
var bundleObj = mailman.GetAllHeaders(numBodyLines);
if (mailman.LastMethodSuccess == false) {
console.log(mailman.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using FetchAll.
// Your application creates a new, empty EmailBundle object which is passed
// in the last argument and filled upon success.
var keepOnServer = true;
var headersOnly = true;
var bundleOut = new chilkat.EmailBundle();
success = mailman.FetchAll(keepOnServer,headersOnly,numBodyLines,bundleOut);
if (success == false) {
console.log(mailman.LastErrorText);
return;
}
}
chilkatExample();