Skip to main content

TypeScript SDK

Official Node.js / TypeScript client for the Mailofly REST API. Package: mailofly · Requires: Node.js 18+ · Quickstart: Node.js

Install


Initialize

Create an API key first.

Send email

Resend-compatible client.emails.send():

With a saved template

With attachments, tags, and headers

Retrieve & list

last_event is mapped from mail log status (sentdelivered). cc, bcc, and reply_to are not stored and return null / []. Use GET /v1/mail-logs for campaign context and page-based filters. client.compose.send is deprecated and forwards to /v1/emails.

Batch send (up to 100 emails)


Resources

Examples


Discovery (no API key)


Error handling