parse-multipart-mixed-mail-pmb

    0.1.4 • Public • Published

    parse-multipart-mixed-mail-pmb

    Split a 'Content-Type: multipart/mixed' email into parsed headers and body parts.

    API

    This module exports one function, which carries another function:

    parseMail(raw[, opt])

    raw should be a Buffer or "binary" (latin-1) String. Its API is the same as splitParseHeaders() from parse-mail-attachment-pmb, except that body will be an array of raw body parts as produced by .splitBody(). Use splitParseHeaders() or parseAttachment() to process them further.

    opts is an optional options object that supports these keys:

    • acceptJustText (default: false): If truthy, and the Content-Type starts with text/, rather than lamenting that it's not a multipart mail, consider the entire mail as its first (and only) body part.

    .splitBody(raw)

    raw should be a Buffer or "binary" (latin-1) String. Split just the body parts, and return them, as an array of Buffers. Assumes the first line of raw is a boundary.

    Known issues

    • Needs more/better tests and docs.

     

    License

    ISC

    Install

    npm i parse-multipart-mixed-mail-pmb

    DownloadsWeekly Downloads

    3

    Version

    0.1.4

    License

    ISC

    Unpacked Size

    6.42 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar