Socket
Socket
Sign inDemoInstall

emailparser

Package Overview
Dependencies
4
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    emailparser

A simple email parser


Version published
Weekly downloads
116
decreased by-18.31%
Maintainers
1
Install size
740 kB
Created
Weekly downloads
 

Readme

Source

nodejs Email Parser

BREAKING CHANGES - see changes section

A simple MIME email parser for nodejs applications.

Takes raw emails and parses out text and attachments.

Usage

const emailParser = require('emailparser');

let email = ` [ raw email text ] `;

let parsedEmail = emailParser.parseEmail(email);
console.log(parsedEmail);

/*
{
    "attachments": [],
    "content": [
        { ... }
    ],
    "headers": {
        "date": 0,
        "from": { "parsed": "test1@example.com", "raw": "Test1 <test1@example.com>" },
        "to": [{ "parsed": "test2@example.com", "raw": "test2@example.com" }],
        "subject": "email test"
    }
}
*/

Changes

0.0.17 - BREAKING

parseEmail(body) returned Object:

  • headers field changed to include all raw email headers, no parsing
  • previous headers now appear in meta field - has specific parsed headers: to, from, etc

Keywords

FAQs

Last updated on 15 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc