forked from noInfoPath/noinfopath-mailparser
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsimple-options.js
More file actions
23 lines (18 loc) · 784 Bytes
/
simple-options.js
File metadata and controls
23 lines (18 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* eslint no-console:0 */
'use strict';
const util = require('util');
const fs = require('fs');
const simpleParser = require('../lib/simple-parser.js');
async function main() {
let mail = await simpleParser(fs.createReadStream(__dirname + '/nodemailer.eml'), {
skipImageLinks: true, // do not convert CID attachments to data URL images
skipHtmlToText: false, // generate plaintext from HTML if needed
skipTextToHtml: false, // generate HTML from plaintext if needed
skipTextLinks: true, // do not linkify links in plaintext content
formatDateString: date => date.toUTCString() // format date in RFC822 embedded HTML head section
});
console.log(util.inspect(mail, false, 22));
}
main().catch(err => {
console.log(err);
});