Temp Mail API & SDK

Unified REST API for developers: create temp mail addresses, receive real emails.

Mail.td is a Developer Email Platform with a unified REST API for creating temp mail addresses, receiving real emails, and delivering new messages in real time via WebSocket or signed Webhooks. The API is free to start — compatible with any HTTP client. Call it directly from Selenium, Cypress, Playwright, Puppeteer tests, CI/CD pipelines, or your own backend.

Workflow

  1. 1

    Call POST /api/accounts to create a temp mail address on a Mail.td system domain (or a Pro custom domain).

  2. 2

    Use the address in your test scripts, applications, or any scenario that needs to receive email.

  3. 3

    Mail.td's SMTP server receives the email, parses and stores it.

  4. 4

    Poll GET /api/accounts/{id}/messages, or subscribe via WebSocket / register a Webhook for real-time delivery.

  5. 5

    Call GET /api/accounts/{id}/messages/{messageId} for the full parsed result — headers, body (plain text + HTML), attachments, raw .eml.

  6. 6

    Delete the mailbox manually when done, or let it auto-expire after 7 days.

SDK & Client Libraries

Mail.td provides official SDKs in three languages. Each client fully covers the REST API with typed responses and error handling — install, authenticate with your Pro API Token, and start using it.

Node.js / TypeScript

npm install mailtd

Zero-dependency client using native fetch, with full TypeScript type definitions.

Python

pip install mailtd

HTTP-based client with dataclass types and async context manager support.

Go

go get github.com/mailtd/mailtd-go

stdlib-only, context-based request lifecycle, fully typed structs.

SMTP Sandbox Outbound Email Testing

Mail.td also provides an SMTP Sandbox — a virtual SMTP server that intercepts all emails sent by your application without actually delivering them. Point your app's SMTP client at the sandbox to end-to-end test transactional emails, and inspect subjects, HTML bodies, and attachments through the same REST API. Real users never receive test emails.

Important Notes All emails are automatically deleted after 7 days on both Free and Pro plans. Mail.td is designed for email testing, QA automation, and temporary developer use — not as a long-term mailbox.