The parser emits ‘headers’ once message headers have been processed. keepCidLinks boolean simpleParser-only option.skipTextLinks boolean Do not linkify links in plaintext content.skipTextToHtml boolean Don’t generate HTML from plaintext message.skipImageLinks boolean Skip converting CID attachments to data URL images.
formatDateString function Provide a custom formatting function.maxHtmlLengthToParse number The maximum amount of HTML to parse in bytes.skipHtmlToText boolean Don’t generate plaintext from HTML.It is a transform stream that takes email source as bytestream for the input and emits data objects for attachments and text contents.Ĭonst MailParser = require( 'mailparser'). MailParser is a lower-level email parsing class.
#Email parser download
to is an address object for the To: header.from is an address object for the From: header.subject is the subject line (also available from the header (‘subject’)).headers – a Map object with lowercase header keys.Parsed mail* object has the following properties source is either a stream, a Buffer or a string that needs to be parsed.Let parsed = await simpleParser( source)