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

nestjs-groundmail

v0.1.3

Published

NestJS module for Groundmail transactional email: inject a ready Groundmail client anywhere in your app

Readme


Works with NestJS 10, 11 and 12, in CommonJS and ESM apps.

Install

npm install nestjs-groundmail
GROUNDMAIL_API_KEY=gm_your_key_here

Usage

// app.module.ts
import { Module } from '@nestjs/common'
import { GroundmailModule } from 'nestjs-groundmail'

@Module({
  imports: [GroundmailModule.forRoot({ apiKey: process.env.GROUNDMAIL_API_KEY, isGlobal: true })],
})
export class AppModule {}
// receipts.service.ts
import { Injectable } from '@nestjs/common'
import { InjectGroundmail, type Groundmail } from 'nestjs-groundmail'

@Injectable()
export class ReceiptsService {
  constructor(@InjectGroundmail() private readonly groundmail: Groundmail) {}

  sendReceipt(to: string) {
    return this.groundmail.emails.send({
      from: 'Acme <[email protected]>',
      to,
      subject: 'Your receipt',
      html: '<p>Thanks for your purchase.</p>',
    })
  }
}

The injected client is the full groundmail SDK: emails, templates, domains, webhooks and suppressions.

Config from ConfigService

GroundmailModule.forRootAsync({
  imports: [ConfigModule],
  inject: [ConfigService],
  useFactory: (config: ConfigService) => ({ apiKey: config.getOrThrow('GROUNDMAIL_API_KEY') }),
  isGlobal: true,
})

Options

| Option | Purpose | |--------|---------| | apiKey | Groundmail API key. Falls back to GROUNDMAIL_API_KEY | | baseUrl | Override the API base URL | | isGlobal | Make the client injectable in every module | | client | Use an existing Groundmail instance (tests) |

Inject by token with @Inject(GROUNDMAIL_CLIENT) if you prefer it to the decorator.

Contributing

Found a bug or want something added? Open an issue. This code is published here on each release, so we port fixes rather than merging pull requests directly. The HTTP client itself is the groundmail package.

Why Groundmail

  • Our own mail servers and IP space. Your password resets and receipts don't share a pool with bulk marketing senders.
  • Transactional email only. No newsletters or cold outreach on the platform, which keeps the sending reputation clean.
  • Start free. 3,000 emails a month on the Free plan; Pro is 50,000 emails for $20/month. Dedicated IPs on Scale.
  • Built for code and for agents. REST API, SMTP, SDKs for Node, Python, Go, PHP and Ruby, a CLI, and an MCP server for Claude, ChatGPT and Cursor.

All Groundmail libraries

| Use | Package | |-----|---------| | Node.js / TypeScript | groundmail on npm | | Python (Django), Go, Ruby (Rails Action Mailer) | Groundmail/groundmail-sdks | | PHP | Groundmail/groundmail-php | | Laravel | Groundmail/groundmail-laravel | | Symfony Mailer | Groundmail/groundmail-symfony-mailer | | Nodemailer | Groundmail/groundmail-nodemailer | | NestJS | Groundmail/nestjs-groundmail | | Strapi | Groundmail/strapi-provider-email-groundmail | | Medusa | Groundmail/medusa-notification-groundmail | | AdonisJS | Groundmail/adonisjs-groundmail | | Phoenix (Swoosh) | Groundmail/swoosh_groundmail | | CLI | groundmail-cli on npm | | MCP server (Claude, ChatGPT, Cursor) | Groundmail/groundmail-mcp | | Agent skills and Claude Code plugin | Groundmail/groundmail-skills | | Email templates (React Email, MJML, HTML) | Groundmail/email-templates |

Website · Docs · Pricing · Sign up free