Getting Started

Point an MX record at mx.smtp.dev, create an account, and send your app's first test email. Read it over IMAP, POP3, API, or the web UI.

You need a domain whose DNS you can edit. A subdomain such as test.example.com is enough, and mail for example.com stays where it is.

  1. Sign up and log in
  2. Go to Domains and add your domain
  3. Add an MX record pointing to mx.smtp.dev at your DNS provider (details)
  4. Go to Accounts and create an email address on that domain
  5. Send an email to that address from your app
  6. Open the account in Mail - your email should be there
You can also use any email client over IMAP, POP3, SMTP and API.

Check It Works

Confirm the MX record before you send anything:

dig +short MX test.example.com

It should print mx.smtp.dev. after a priority number. Until it does, mail for the domain goes to its old destination, or nowhere.

Then send the new address a message from any mailbox you have. The domain receives real email, so your work or personal address works as the sender. If nothing arrives, check DNS first: see troubleshooting.

How Mail Gets In

Mail reaches an account by one of two routes, and most setups use both.

Over MXThrough send.smtp.dev
SenderAnything on the internet: your email provider, another service, your own inboxYour app or test, logged in as a sandbox account
SetupThe MX record from step 3The account's address and password (settings)
Delivers toAccounts on your domainsAccounts in your sandbox, and nowhere else
SPF, DKIM, DMARC resultsYesNo. The message never crosses your DNS
What it testsThe provider and DNS that production usesYour app's own SMTP code, with no way to email a customer

Over the API

The same flow, scripted. Create a key on the API Keys page first; the MX record from step 3 still has to exist.

curl -X POST https://api.smtp.dev/domains \
  -H "X-API-KEY: $SMTP_DEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain": "test.example.com"}'

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

Everything in the UI maps to a REST endpoint, so whatever you set up by hand you can also script.

DomainsYour own domains and subdomains, isolated from each other.
AccountsEmail addresses with mailboxes, passwords, and storage. Plus-sign aliasing on every plan, and catch-all on Pro and Max.
MailboxesInbox, Sent, Trash, Drafts, Junk by default. Create more as needed.
MessagesHTML and plain text views, raw SMTP source, SPF/DKIM/DMARC checks, attachments.
ComposeSend test emails between accounts from the browser.
API TokensKeys for the REST API.
Real-timeNew messages are pushed over SSE.

Next Steps

  • SMTP Test: send a test email with swaks, curl, or your app's mailer, and read it back.
  • API Quickstart: create an inbox per test, wait for the message, and assert on it.
  • CI, Playwright, and Cypress: the same checks in your pipeline and browser tests.
  • OTP Codes and Magic Links: read the code out of the email and finish the login in a test.
  • Nodemailer: send from Node and assert on links, headers, and attachments.
  • IMAP and POP3: read an inbox by hand with openssl, or from curl, Python, and Node.
  • Local Development: one SMTP host for your laptop, CI, and staging.