Node.js
Node.js
Transition from MailMan.FetchMultiple to MailMan.FetchUidlSet
Provides instructions for replacing deprecated FetchMultiple method calls with FetchUidlSet.Chilkat Node.js Downloads
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");
// ------------------------------------------------------------------------
// The FetchMultiple method is deprecated:
// bundleObj: EmailBundle
var bundleObj = mailman.FetchMultiple(saUidls);
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 = false;
// Irrelevant because we are not downloading headers-only.
var numBodyLines = 0;
var bundleOut = new chilkat.EmailBundle();
success = mailman.FetchUidlSet(stUidls,headersOnly,numBodyLines,bundleOut);
if (success == false) {
console.log(mailman.LastErrorText);
return;
}
}
chilkatExample();