Node.js
Node.js
Transition from Imap.FetchSequenceHeaders to Imap.FetchRange
Provides instructions for replacing deprecated FetchSequenceHeaders method calls with FetchRange.Chilkat Node.js Downloads
NODEJS_PRELUDE
function chilkatExample() {
var success = false;
var imap = new chilkat.Imap();
// ...
// ...
var startSeqNum = 1;
var count = 5;
// ------------------------------------------------------------------------
// The FetchSequenceHeaders method is deprecated:
// bundleObj: EmailBundle
var bundleObj = imap.FetchSequenceHeaders(startSeqNum,count);
if (imap.LastMethodSuccess == false) {
console.log(imap.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using FetchRange.
// 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 = imap.FetchRange(headersOnly,startSeqNum,count,bundleOut);
if (success == false) {
console.log(imap.LastErrorText);
return;
}
}
chilkatExample();