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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@alimzen/relayo-smtp

v0.2.1

Published

SMTP driver for Relayo, built on Nodemailer.

Downloads

104

Readme

@alimzen/relayo-smtp

SMTP driver for Relayo, built on Nodemailer. Works with any SMTP server: your own MTA, a relay, or a provider's SMTP endpoint.

npm install @alimzen/relayo @alimzen/relayo-smtp

Usage

import { createRelayo } from '@alimzen/relayo';
import { smtp } from '@alimzen/relayo-smtp';

const relayo = createRelayo({
  email: smtp({ host: 'smtp.example.com', port: 587, auth: { user: 'apikey', pass: process.env.SMTP_PASS! } }),
});

The first argument is anything Nodemailer's createTransport takes:

smtp('smtps://user:[email protected]');           // connection URL
smtp({ pool: true, host: 'smtp.example.com', maxConnections: 5 }); // pooled connections
smtp(existingNodemailerTransporter);                   // a transporter you already have
smtp(options, { name: 'mailrelay' });                  // provider name in results, events and errors
smtp(options, { bounceAddress: '[email protected]' }); // envelope sender: where bounce reports go

The driver adds:

  • driver.verify(): checks the connection and credentials; throws a RelayoError on failure.
  • driver.close(): closes pooled connections.

providerOptions on a message are merged into Nodemailer's mail options (priority, dsn, list, ...).

What it sends

  • Message-ID: <messageId@your-from-domain> and an X-Relayo-Message-ID header with Relayo's id, so bounce reports (DSNs) can be matched to the original send.
  • metadata in an X-Relayo-Metadata header (base64 JSON), so it comes back with bounces. Recipients can see headers: pass { metadataHeader: false } if your metadata is sensitive.
  • Results have status: 'sent' once the server accepts the message. If the server refuses some recipients and accepts the rest, the refused ones are in result.rejectedRecipients.

Errors

| Server answer | Relayo error | Retryable | | --- | --- | --- | | 5xx (e.g. 550 5.1.1, 554 5.7.1) | RejectedError | no | | 4xx with throttling (450 4.2.1, 421 … try again later, 4.7.28) | RateLimitError | yes | | Other 4xx (e.g. 452 4.2.2 mailbox full) | ProviderUnavailableError | yes | | Bad credentials (535, EAUTH) | AuthenticationError | no | | Connection refused, timeout, TLS, DNS | ProviderUnavailableError | yes | | Invalid envelope or configuration (no server answer) | ValidationError | no |

The SMTP details (responseCode, enhancedCode, response, rejected) are in error.raw.

Webhooks

SMTP has none. Problems the server reports during the session surface as errors or rejectedRecipients; bounces that happen later arrive as emails to the envelope sender (bounceAddress, or your from). @alimzen/relayo-bounces turns them, and spam complaints from feedback loops, into Relayo events, and @alimzen/relayo-imap reads the mailbox for you.