Getting Started
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.
- Sign up and log in
- Go to Domains and add your domain
- Add an MX record pointing to
mx.smtp.devat your DNS provider (details) - Go to Accounts and create an email address on that domain
- Send an email to that address from your app
- Open the account in Mail - your email should be there
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 MX | Through send.smtp.dev | |
|---|---|---|
| Sender | Anything on the internet: your email provider, another service, your own inbox | Your app or test, logged in as a sandbox account |
| Setup | The MX record from step 3 | The account's address and password (settings) |
| Delivers to | Accounts on your domains | Accounts in your sandbox, and nowhere else |
| SPF, DKIM, DMARC results | Yes | No. The message never crosses your DNS |
| What it tests | The provider and DNS that production uses | Your 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.
| Domains | Your own domains and subdomains, isolated from each other. |
| Accounts | Email addresses with mailboxes, passwords, and storage. Plus-sign aliasing on every plan, and catch-all on Pro and Max. |
| Mailboxes | Inbox, Sent, Trash, Drafts, Junk by default. Create more as needed. |
| Messages | HTML and plain text views, raw SMTP source, SPF/DKIM/DMARC checks, attachments. |
| Compose | Send test emails between accounts from the browser. |
| API Tokens | Keys for the REST API. |
| Real-time | New 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.