Node.js
Node.js
Transition from Email.CreateMdn to Email.ToMdn
Provides instructions for replacing deprecated CreateMdn method calls with ToMdn.Chilkat Node.js Downloads
NODEJS_PRELUDE
function chilkatExample() {
var success = false;
var email = new chilkat.Email();
// ...
// ...
var explanation = "...";
var statusFieldsXml = "...";
var headerOnly = false;
// ------------------------------------------------------------------------
// The CreateMdn method is deprecated:
// emailObj: Email
var emailObj = email.CreateMdn(explanation,statusFieldsXml,headerOnly);
if (email.LastMethodSuccess == false) {
console.log(email.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using ToMdn.
// Your application creates a new, empty Email object which is passed
// in the last argument and filled upon success.
var emailOut = new chilkat.Email();
success = email.ToMdn(explanation,statusFieldsXml,headerOnly,emailOut);
if (success == false) {
console.log(email.LastErrorText);
return;
}
}
chilkatExample();