Node.js
Node.js
Transition from MailMan.LoadMime to Email.SetFromMimeText
Provides instructions for replacing deprecated LoadMime method calls with Email.SetFromMimeText.Chilkat Node.js Downloads
NODEJS_PRELUDE
function chilkatExample() {
var success = false;
var mailman = new chilkat.MailMan();
// ...
// ...
var mimeText = "....";
// ------------------------------------------------------------------------
// The LoadMime method is deprecated:
// emailObj: Email
var emailObj = mailman.LoadMime(mimeText);
if (mailman.LastMethodSuccess == false) {
console.log(mailman.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using Email.SetFromMimeText.
var email = new chilkat.Email();
success = email.SetFromMimeText(mimeText);
if (success == false) {
console.log(email.LastErrorText);
return;
}
}
chilkatExample();