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

@mostajs/smtp-lite

v0.1.0

Published

Client SMTP minimal ZÉRO-DÉPENDANCE (node:net+tls, soumission 587 STARTTLS, AUTH LOGIN). Variante « lite » sans natif ni npm (comme @mostajs/auth-lite) pour apps zéro-build / WebContainer. Pour les drivers riches (Resend/SES/Brevo…) voir @mostajs/mailer.

Readme

@mostajs/smtp-lite

Auteur : Dr Hamid MADANI [email protected] · Licence : AGPL-3.0-or-later

Transport SMTP minimal zéro-dépendance (uniquement node:net + node:tls) : soumission sur le port 587 avec STARTTLS et AUTH LOGIN. Variante « lite » (comme @mostajs/auth-lite) pour les apps zéro-build / vendorisées / WebContainer, sans nodemailer ni addon natif.

Pour un dispatcher complet multi-drivers (Resend, SES, Postmark, Brevo, logs, idempotence), voir @mostajs/mailer — qui peut justement consommer ce module via son driver smtp-lite.

API

import { createSmtpTransport, sendMail, encodeSubject } from '@mostajs/smtp-lite';

// Transport réutilisable
const t = createSmtpTransport({ host: 'smtp.ionos.fr', port: 587, user: '[email protected]', pass: '***' });
await t.send({ from: '[email protected]', fromName: 'Hadhinat', to: '[email protected]', subject: 'Bonjour', html: '<p>…</p>' });

// Ou en une fois
await sendMail({ host, port, user, pass }, { from, fromName, to, subject, html, text });
  • createSmtpTransport(server) → { server, send(mail) }
  • sendMail(server, mail) → { ok: true } (throw avec le code SMTP en cas de rejet)
  • encodeSubject(s) / encodeDisplayName(name) : encodage RFC 2047 des en-têtes non-ASCII (évite les rejets 554 sur sujets/noms accentués).

Notes

  • Les en-têtes Subject et le nom d'affichage From sont encodés RFC 2047 si non-ASCII (sinon certains serveurs renvoient 554 Transaction failed).
  • Dot-stuffing RFC 5321 appliqué au corps.
  • Timeouts (connexion + réponse) et propagation d'erreur socket intégrés.