Only show the first email's sender and receiver, the code isn't complete. The group didn't realize this function.
.command('extractContact', 'Extract contact from a list of mail') .argument('<file>', 'The file to check with Vpf parser') .action(function(args, options, logger){ fs.readdir(args.file, 'utf8', function (err,data) { if (err) { return logger.warn(err); } let analyzer = new MailParser(options.showTokenize, options.showSymbols); let parsedDataFunction = new ParsedDataFunction(analyzer); parsedDataFunction.createListOfMailFromDir(args.file); console.log(analyzer.parsedMail[0].to) for (let i = 0; i < analyzer.parsedMail.length; i++) { // Output error, code incomplete,always output the first mail console.log(analyzer.parsedMail[0].dateTime); // console.log(analyzer.parsedMail[i].to); } });
Diff:
Diff:
already complete the code, problem solved
Last edit: Zhao Mingqiang 2020-01-06