npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@bernierllc/inbound-email-parse

v1.0.1

Published

Inbound email receiving, parsing, and routing service with webhook endpoints for all major providers and rule-based routing to downstream systems

Readme

@bernierllc/inbound-email-parse

Inbound email receiving, parsing, and routing service that provides webhook endpoints for all major email providers, MIME parsing with attachment handling, and rule-based routing to downstream systems.

Installation

npm install @bernierllc/inbound-email-parse

Usage

import { InboundEmailParser } from '@bernierllc/inbound-email-parse';

const parser = new InboundEmailParser({
  providers: [
    {
      provider: 'sendgrid',
      enabled: true,
      signingSecret: process.env.SENDGRID_SIGNING_SECRET
    }
  ],
  defaultRoutingRules: [
    {
      id: 'route-to-support',
      name: 'Route support emails',
      priority: 100,
      enabled: true,
      conditions: [
        { type: 'to', field: 'address', operator: 'contains', value: 'support@' }
      ],
      actions: [
        {
          type: 'route',
          destination: {
            type: 'neverhub',
            config: { eventType: 'support.email.received' }
          }
        }
      ]
    }
  ]
});

await parser.initialize();

// Process inbound email from webhook
const result = await parser.processInbound('sendgrid', webhookPayload, signature);

if (result.success) {
  console.log(`Processed email: ${result.emailId}`);
  console.log(`Routed to ${result.routed.length} destinations`);
}

Features

  • Multi-Provider Support: SendGrid, Postmark, Mailgun, AWS SES, and generic MIME
  • Webhook Signature Validation: Secure webhook receiving with signature verification
  • MIME Parsing: Full email parsing including headers, body, and attachments
  • Attachment Processing: Handle attachments with size limits, type validation, and checksums
  • Rule-Based Routing: Flexible routing engine with conditions and actions
  • Multi-Destination: Route single email to multiple systems simultaneously
  • NeverHub Integration: Publish events and subscribe to routing updates
  • Cross-Suite Compatibility: Used by Email Suite, Chat Suite, Content Management Suite, and Task Suite

API Reference

[Complete API documentation will be generated with TypeDoc]

Configuration

See Configuration Guide for detailed configuration options.

Integration Status

  • Logger: integrated - Comprehensive logging for all operations
  • Docs-Suite: ready - TypeDoc format
  • NeverHub: required - Event publishing and service discovery

License

Copyright (c) 2025 Bernier LLC. All rights reserved.