Node.js Requires Chilkat v11.0.0+
Node.js
Read To and Cc from a received message
See more Email Object Examples
Enumerate visible recipients by zero-based index. An address can have an empty display name. A delivered copy usually does not reveal recipients who were blind-copied.
Chilkat Node.js Downloads
NODEJS_PRELUDE
function chilkatExample() {
var success = false;
// Assumes Chilkat is unlocked. See Global Unlock Sample.
var email = new chilkat.Email();
success = email.LoadEml("message.eml");
if (success !== true) {
console.log(email.LastErrorText);
return;
}
var i = 0;
while ((i < email.NumTo)) {
console.log("To: " + email.GetToName(i) + " " + email.GetToAddr(i));
i = i+1;
}
i = 0;
while ((i < email.NumCC)) {
console.log("Cc: " + email.GetCcName(i) + " " + email.GetCcAddr(i));
i = i+1;
}
}
chilkatExample();