node-mbox | mbox file parser for Node.js | Parser library
kandi X-RAY | node-mbox Summary
kandi X-RAY | node-mbox Summary
This module parses mbox files, as described here. Starting with version 0.1.0, it's pretty speedy, processing a 1.5GB mbox file in about 20 seconds. Note that this module doesn't parse the mail messages themselves, for which other solutions exist (for example the quite able mailparser module from Andris Reinman).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of node-mbox
node-mbox Key Features
node-mbox Examples and Code Snippets
Community Discussions
Trending Discussions on node-mbox
QUESTION
I am using simple-parser
from mail-parser to parse some emails (in combination with node-mbox). These are wonderful libs and I have it all working but I am having trouble with the JavaScript Date
object.
According to the simple-parser
docs the date of a parsed email is a date object:
date is a Date object for the Date: header
But for some reason I am not able to work with it as an object. I want to pull out the date.year, date.month, etc. If I log it, it appears to be an object – but I am not able to treat it as such: in example below myDate.year
is reported as undefined.
Am I doing something wrong here? If I treat the mail.date as a string and try to create a new Date object, it still doesn't work correctly.
...ANSWER
Answered 2017-Apr-07 at 00:32If it's the javascript Date
object, to get the year you can use the getFullYear()
function - it's not stored as a property "year" on the object:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install node-mbox
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page