Skip to main content

TypeScript / Node.js SDK

The official Mailofly library for Node.js and TypeScript. Type-safe, fast, and ships with zero unnecessary baggage. Package: @mailofly/node · Requires: Node.js 18+ · Quickstart: Node.js guide

Install it


Set it up

You’ll need an API key first. Create one in the dashboard.

Send an email

Using a saved template

If you’ve built a template in the dashboard, reference it by ID:

With attachments, tags, and custom headers

Batch send (up to 100 at once)


Other things you can do


Handling errors