---
title: "Email Testing for Developers - SMTP Labs, Inc."
description: "Email sandbox for developers. A test SMTP server, real MX on your domain, IMAP, POP3, and a REST API. Nothing leaves the sandbox."
canonical_url: "https://smtp.dev/"
meta:
  "og:description": "Email sandbox for developers. A test SMTP server, real MX on your domain, IMAP, POP3, and a REST API. Nothing leaves the sandbox."
  "og:image": "https://smtp.dev/_og/s/o_554f4af7e8a4ec6f.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Email Testing for Developers"
  "twitter:image": "https://smtp.dev/_og/s/o_554f4af7e8a4ec6f.png"
---

> Index of every page on this site: [llms.txt](https://smtp.dev/llms.txt)

# Email Testing for Developers

Test emails like you debug code. SMTP in, IMAP/API out. Inspect headers, MIME, and raw source. Nothing leaves the sandbox.

[Get Started](https://smtp.dev/signup/) [Documentation](https://smtp.dev/docs/getting-started/)

## **SMTP, IMAP, POP3**

Any mail client or library connects with its standard settings. No SDK to install.

- [Quick setup](https://smtp.dev/docs/setup/domain/)**Quick setup** Point an MX record and the domain receives real email from any service.
- [REST API](https://smtp.dev/docs/api/)**REST API** Accounts, messages, domains, tokens. Everything in the UI has an endpoint.
- [Message inspection](https://smtp.dev/docs/features/message/)**Message inspection** Headers, the MIME tree, and the raw RFC 5322 source of every message.

![SMTP, IMAP, and POP3 protocol support](https://smtp.dev/protocols-1280.webp)

## **Inspect received email**

Check what arrived in the UI or wire it into CI.

- **Delivery checks** HTML preview, plain text, headers, and raw source. SPF, DKIM, and DMARC results come over the API.
- **CI-ready** Any CI that can send over SMTP works, including GitHub Actions, Jenkins, and GitLab CI.
- **Deliverability audit** Sender config, HTML structure, links, and the content patterns spam filters flag. Grouped by severity.

![Email message preview with headers, HTML, and raw source](https://smtp.dev/preview-1280.webp)

## **Send, read, assert**

Your app sends over SMTP. Your test reads the result over the API. The whole loop fits on one screen.

[Read the CI guide](https://smtp.dev/docs/guides/ci/)

```bash
# create an inbox
curl -X POST https://api.smtp.dev/accounts \
  -H "X-API-KEY: $SMTP_DEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"address": "qa@example.com", "password": "use-a-secret"}'

# your app sends to it, then read what arrived
curl "https://api.smtp.dev/accounts/$ACCOUNT/mailboxes/$INBOX/messages" \
  -H "X-API-KEY: $SMTP_DEV_API_KEY"
```

## **Testing guides**

**SMTP tests**

Send with swaks, curl, or your app's mailer. Read the raw source back.

[SMTP tests](https://smtp.dev/docs/guides/send-test-email/)

**API tests**

Create an inbox per test over REST, then assert on the message as JSON.

[API tests](https://smtp.dev/docs/guides/email-testing-api/)

**CI assertions**

Send from the test suite, poll the API, and assert on subject and body.

[CI assertions](https://smtp.dev/docs/guides/ci/)

**E2E flows**

The Playwright test clicks the real reset link from the real email.

[E2E flows](https://smtp.dev/docs/guides/e2e/)

**Cypress specs**

A task waits for the email in Node. The spec types the code it carried.

[Cypress specs](https://smtp.dev/docs/guides/cypress/)

**SPF, DKIM, DMARC**

Authentication verdicts from staging before you touch production DNS.

[SPF, DKIM, DMARC](https://smtp.dev/docs/guides/spf-dkim-dmarc/)

**QA signups**

A catch-all account hands every test run a fresh address on your domain.

[QA signups](https://smtp.dev/docs/guides/catch-all/)

**Client previews**

The same message in Thunderbird and Apple Mail, over plain IMAP.

[Client previews](https://smtp.dev/docs/guides/email-clients/)

**AI agents**

Agents read OTP codes and confirmation links over the API.

[AI agents](https://smtp.dev/docs/guides/agents/)

**OTP & magic links**

Read the code from the real email. Check that a resend cancels the old one.

[OTP & magic links](https://smtp.dev/docs/guides/otp-magic-links/)

**Nodemailer**

Send through a real SMTP server from a Node test. Assert on links, headers, and attachments.

[Nodemailer](https://smtp.dev/docs/guides/nodemailer/)

**Attachment limits**

Why a 25 MB limit fits about 18 MB of files, and how to test the edge.

[Attachment limits](https://smtp.dev/docs/guides/email-size-limits/)

## **Features**

**Custom Domains**

Bring your own domains and subdomains. One MX record each.

**Disposable Accounts**

Create an address per test run over the API. Delete it after.

**Unlimited Messages**

No daily caps and no metering on any plan.

**Sandboxed**

Receives real email from any service. Sends only within the sandbox.

**SPF, DKIM, DMARC**

Checked on every inbound message. Results in the UI and the API.

**Retention Timers**

Messages kept for your plan's window, up to 90 days. Per-message expiry for shorter.

**REST API**

Domains, accounts, mailboxes, messages, tokens. OpenAPI spec included.

**Real-time Updates**

New messages pushed via SSE. No polling.

**Catch-All & Aliasing**

Wildcard accounts and plus-sign addressing. Capture everything or route by tag.

## **FAQ**

A hosted email sandbox: mail servers that accept your app's email and keep it instead of delivering it. Point a domain's MX record at it or send through send.smtp.dev, then read what arrived over IMAP, POP3, the REST API, or the web UI.

No. Mail sent through send.smtp.dev only reaches accounts in your sandbox, and any other recipient is refused, so a test can't email a customer by accident. For real delivery, use a service built for sending, like Amazon SES, SendGrid, or Postmark.

Yes. Sandbox domains have real MX records, so anything can deliver to them, such as a signup confirmation from a third-party service, an OTP, or mail from your staging provider. Receiving is unrestricted. Only outbound mail is limited.

Only from the receiving end. Send from your server or provider to an address on your sandbox domain, and the message arrives with its raw source and [**SPF, DKIM, and DMARC results**](https://smtp.dev/docs/guides/spf-dkim-dmarc/). It doesn't probe a server from outside, look up blocklists, or predict whether Gmail will file a message as spam. To check a server by hand, the [**SMTP test guide**](https://smtp.dev/docs/guides/send-test-email/#testing-your-own-server) has swaks, curl, and openssl commands that work against any host.

Not a public one. There are no shared domains and no inboxes anyone can open. Addresses live on a domain you own, and each account has its own password. Tests can still create an address per run over the API and delete it afterwards.

Local catchers run per machine. The sandbox is hosted on real domains with real DNS, so CI, staging, and your laptop all hit the same MX path production will. Inbound messages also get SPF, DKIM, and DMARC verdicts, which localhost can't give you. The [**fake SMTP server comparison**](https://smtp.dev/docs/guides/local-development/) puts them side by side.

It puts addresses on your own domain, has no message quotas, and includes IMAP and POP3 on every plan. The comparisons list prices, limits, when to stay where you are, and how to move a test suite: [**Mailtrap**](https://smtp.dev/docs/alternatives/mailtrap/), [**Mailosaur**](https://smtp.dev/docs/alternatives/mailosaur/), [**Mailinator**](https://smtp.dev/docs/alternatives/mailinator/).

No. It's standard SMTP, IMAP, and POP3, plus a REST API described by an OpenAPI spec. Your existing mail library and HTTP client are enough.

Poll the REST API for new messages, or subscribe over SSE and react when one lands. The [**CI**](https://smtp.dev/docs/guides/ci/), [**Playwright**](https://smtp.dev/docs/guides/e2e/), and [**AI agent**](https://smtp.dev/docs/guides/agents/) guides have working examples.

SMTP on send.smtp.dev port 587, IMAP on imap.smtp.dev port 993, and POP3 on pop.smtp.dev port 995. The login is the account's full address and its password. The [**IMAP and POP3 guide**](https://smtp.dev/docs/guides/imap-pop3/) has the commands for both.

## **Start testing**

Sign up, add a domain, receive your first test email.

[Get Started](https://smtp.dev/signup/)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://smtp.dev/#organization","name":"SMTP Labs, Inc.","url":"https://smtp.dev/","logo":"https://smtp.dev/favicon-512x512.png","sameAs":["https://x.com/smtp_labs","https://github.com/smtplabs"]},{"@type":"WebSite","@id":"https://smtp.dev/#website","name":"smtp.dev","url":"https://smtp.dev/","publisher":{"@id":"https://smtp.dev/#organization"}},{"@type":"WebPage","@id":"https://smtp.dev/#webpage","url":"https://smtp.dev/","name":"Email Testing for Developers","description":"Email sandbox for developers. A test SMTP server, real MX on your domain, IMAP, POP3, and a REST API. Nothing leaves the sandbox.","isPartOf":{"@id":"https://smtp.dev/#website"},"about":{"@id":"https://smtp.dev/#organization"}},{"@type":"FAQPage","@id":"https://smtp.dev/#faq","mainEntity":[{"@type":"Question","name":"What is smtp.dev?","acceptedAnswer":{"@type":"Answer","text":"A hosted email sandbox: mail servers that accept your app's email and keep it instead of delivering it. Point a domain's MX record at it or send through send.smtp.dev, then read what arrived over IMAP, POP3, the REST API, or the web UI."}},{"@type":"Question","name":"Does it deliver to real inboxes?","acceptedAnswer":{"@type":"Answer","text":"No. Mail sent through send.smtp.dev only reaches accounts in your sandbox, and any other recipient is refused, so a test can't email a customer by accident. For real delivery, use a service built for sending, like Amazon SES, SendGrid, or Postmark."}},{"@type":"Question","name":"Can it receive email from external services?","acceptedAnswer":{"@type":"Answer","text":"Yes. Sandbox domains have real MX records, so anything can deliver to them, such as a signup confirmation from a third-party service, an OTP, or mail from your staging provider. Receiving is unrestricted. Only outbound mail is limited."}},{"@type":"Question","name":"Can it test my production mail server?","acceptedAnswer":{"@type":"Answer","text":"Only from the receiving end. Send from your server or provider to an address on your sandbox domain, and the message arrives with its raw source and SPF, DKIM, and DMARC results. It doesn't probe a server from outside, look up blocklists, or predict whether Gmail will file a message as spam. To check a server by hand, the SMTP test guide has swaks, curl, and openssl commands that work against any host."}},{"@type":"Question","name":"Is it a disposable email service?","acceptedAnswer":{"@type":"Answer","text":"Not a public one. There are no shared domains and no inboxes anyone can open. Addresses live on a domain you own, and each account has its own password. Tests can still create an address per run over the API and delete it afterwards."}},{"@type":"Question","name":"How is this different from MailHog or Mailpit?","acceptedAnswer":{"@type":"Answer","text":"Local catchers run per machine. The sandbox is hosted on real domains with real DNS, so CI, staging, and your laptop all hit the same MX path production will. Inbound messages also get SPF, DKIM, and DMARC verdicts, which localhost can't give you. The fake SMTP server comparison puts them side by side."}},{"@type":"Question","name":"How does it compare with Mailtrap, Mailosaur, and Mailinator?","acceptedAnswer":{"@type":"Answer","text":"It puts addresses on your own domain, has no message quotas, and includes IMAP and POP3 on every plan. The comparisons list prices, limits, when to stay where you are, and how to move a test suite: Mailtrap, Mailosaur, Mailinator."}},{"@type":"Question","name":"Do I need an SDK?","acceptedAnswer":{"@type":"Answer","text":"No. It's standard SMTP, IMAP, and POP3, plus a REST API described by an OpenAPI spec. Your existing mail library and HTTP client are enough."}},{"@type":"Question","name":"How do tests and agents read a message?","acceptedAnswer":{"@type":"Answer","text":"Poll the REST API for new messages, or subscribe over SSE and react when one lands. The CI, Playwright, and AI agent guides have working examples."}},{"@type":"Question","name":"Which protocols and ports does it use?","acceptedAnswer":{"@type":"Answer","text":"SMTP on send.smtp.dev port 587, IMAP on imap.smtp.dev port 993, and POP3 on pop.smtp.dev port 995. The login is the account's full address and its password. The IMAP and POP3 guide has the commands for both."}}]}]}
```

## Sitemap

See the full [sitemap](https://smtp.dev/sitemap.md) for all pages.
