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

lettermint

v1.5.1

Published

Official Lettermint Node.js SDK

Readme

Lettermint Node.js SDK

NPM Version NPM Downloads Join our Discord server

The official Node.js SDK for Lettermint.

Installation

npm install lettermint

Usage

Initialize the SDK

import { Lettermint } from "lettermint";

const lettermint = new Lettermint({
    apiToken: "your-api-token"
});

Sending Emails

The SDK provides a fluent interface for sending emails:

const response = await lettermint.email
  .from('[email protected]')
  .to('[email protected]')
  .subject('Hello from Lettermint')
  .text('This is a test email sent using the Lettermint Node.js SDK.')
  .send();

console.log(`Email sent with ID: ${response.message_id}`);
console.log(`Status: ${response.status}`);

Advanced Email Options

const response = await lettermint.email
  .from('John Doe <[email protected]>')
  .to('[email protected]', '[email protected]')
  .cc('[email protected]')
  .bcc('[email protected]')
  .replyTo('[email protected]')
  .subject('Hello from Lettermint')
  .html('<h1>Hello</h1><p>This is an HTML email.</p>')
  .text('This is a plain text version of the email.')
  .headers({
    'X-Custom-Header': 'Custom Value',
  })
  .attach('attachment.txt', Buffer.from('Hello World').toString('base64'))
  .attach('logo.png', Buffer.from('...').toString('base64'), 'logo') // Inline attachment
  .idempotencyKey('unique-id-123')
  .metadata({
    foo: 'bar',
  })
  .tag('campaign-123')
  .send();

API Reference

Lettermint Class

The main entry point for the SDK.

const lettermint = new Lettermint({
  apiToken: 'your-api-key',
  baseUrl: 'https://api.lettermint.co/v1', // Optional
  timeout: 30000, // Optional, in milliseconds
});

Email Endpoint

Methods for sending emails:

  • from(email: string): Set the sender email address
  • to(...emails: string[]): Set one or more recipient email addresses
  • subject(subject: string): Set the email subject
  • html(html: string | null): Set the HTML body of the email
  • text(text: string | null): Set the plain text body of the email
  • cc(...emails: string[]): Set one or more CC email addresses
  • bcc(...emails: string[]): Set one or more BCC email addresses
  • replyTo(...emails: string[]): Set one or more Reply-To email addresses
  • headers(headers: Record<string, string>): Set custom headers for the email
  • attach(filename: string, base64Content: string, content_id?: string): Attach a file to the email. Optional content_id for inline attachments.
  • route(route: string): Set the routing key for the email
  • idempotencyKey(key: string): Set an idempotency key to prevent duplicate email sends
  • metadata(metadata: Record<string, string>): Set metadata for the email
  • tag(tag: string): Set a tag for the email
  • send(): Send the email and return a promise with the response

License

MIT