Skip to content
PreviewNot live yet. APIs and SDKs on these pages may change before launch.

Quickstart

Terminal window
npm install @mailpidge/sdk
send.ts
import { MailPidgeClient } from '@mailpidge/sdk'
const mailpidge = new MailPidgeClient({ token: process.env.MAILPIDGE_API_KEY! })
const email = await mailpidge.emails.send({
from: 'Pidge Fit <hello@pidgefit.com>',
to: ['you@example.com'],
subject: 'Hello from MailPidge',
html: '<p>It works.</p>',
})
console.log(email.id)

Run npx tsx send.ts.

from must use your verified domain.

{ "id": "em_01JD4V8QK3S6T2Y9Z7XWB5N0RA", "suppressed": [] }

The email arrives within a minute. Follow its status with webhooks or Get an email. Errors: Errors.