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 🙏

© 2024 – Pkg Stats / Ryan Hefner

maileron

v0.0.1

Published

Server that receives SMTP and serves mail up as JSON via HTTP

Downloads

3

Readme

Maileron build status

SMTP ==> HTTP REST JSON API

wtf

Stand-alone server for receiving email via SMTP and providing access to it via an HTTP REST JSON API. Useful for automated testing that requires receiving email and doing stuff with it. I wanted to be able to test things like the "forgot password" flow, or "email confirmation", from automated tests.

Currently has no persistence or notification. It just receives mail, serves up a mailbox as a JSON array, and lets you clear a mailbox with DELETE. That's it.

status

Prototype. Not ready for production use, but could be used for basic testing purposes.

install

npm install -g maileron

setup

sudo maileron

The sudo is required to listen to ports 25 and 80 for SMTP and HTTP, respectively. Without sudo, maileron will run on ports 9025 and 9080, which means it would only work with specially-configured mail clients.

Now, point your MX record for a domain (in my case, pat.agnoster.net) to the server running maileron (which for me is also pat.agnoster.net).

use

Send an email to [email protected], for instance:

MAIL [email protected]
Subject: Hello World

How are you?

Then hit the webserver (in this example, pat.agnoster.net) and check it out (some values elided for clarity):

GET /inbox/example
200 OK
Content-type: application/json

[
  {
    "text": "How are you?",
    "headers": { ... },
    "subject": "Hello World",
    "from": [
      {
        "address": "[email protected]",
        "name": "Isaac Wolkerstorfer"
      }
    ],
    "to": "example",
    "envelope": {
      "from": "[email protected]",
      "to": ["[email protected]"],
      "date": "2012-08-23T17:50:20.013Z"
    }
  },
  ...
]

That's really all there is to it. You can DELETE a mailbox to clear it.

ideas

GET test.example.com/inbox/example.user.1/?limit=1&timeout=60

Wait for the next mail to come into this mailbox. This means you can easily do a DELETE, perform an action that should trigger an email, then issue a GET ?limit&timeout to wait for the email to show up.

license = MIT