---
title: "Getting Started"
description: "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."
canonical_url: "https://smtp.dev/docs/getting-started/"
---

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

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](https://smtp.dev/signup/) and log in
2. Go to [Domains](https://smtp.dev/domains/) and add your domain
3. Add an MX record pointing to `mx.smtp.dev` at your DNS provider ([details](https://smtp.dev/docs/setup/domain/))
4. Go to [Accounts](https://smtp.dev/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](https://smtp.dev/mail/accounts/) - your email should be there

<note>

You can also use any email client over [IMAP, POP3, SMTP](https://smtp.dev/docs/setup/account/) and [API](https://smtp.dev/docs/api/).

</note>

## Check It Works

Confirm the MX record before you send anything:

```bash
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](https://smtp.dev/docs/setup/domain/#troubleshooting).

## How Mail Gets In

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

<table>
<thead>
  <tr>
    <th>
      
    </th>
    
    <th>
      Over MX
    </th>
    
    <th>
      Through <code>
        send.smtp.dev
      </code>
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Sender
    </td>
    
    <td>
      Anything on the internet: your email provider, another service, your own inbox
    </td>
    
    <td>
      Your app or test, logged in as a sandbox account
    </td>
  </tr>
  
  <tr>
    <td>
      Setup
    </td>
    
    <td>
      The MX record from step 3
    </td>
    
    <td>
      The account's address and password (<a href="/https/smtp.dev/docs/setup/account/">
        settings
      </a>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      Delivers to
    </td>
    
    <td>
      Accounts on your domains
    </td>
    
    <td>
      Accounts in your sandbox, and nowhere else
    </td>
  </tr>
  
  <tr>
    <td>
      SPF, DKIM, DMARC results
    </td>
    
    <td>
      Yes
    </td>
    
    <td>
      No. The message never crosses your DNS
    </td>
  </tr>
  
  <tr>
    <td>
      What it tests
    </td>
    
    <td>
      The provider and DNS that production uses
    </td>
    
    <td>
      Your app's own SMTP code, with no way to email a customer
    </td>
  </tr>
</tbody>
</table>

## Over the API

The same flow, scripted. Create a key on the [API Keys](https://smtp.dev/tokens/) page first; the MX record from step 3 still has to exist.

```bash
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](https://smtp.dev/docs/api/), so whatever you set up by hand you can also script.

<table>
<thead>
  <tr>
    <th>
      
    </th>
    
    <th>
      
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Domains
      </strong>
    </td>
    
    <td>
      Your own domains and subdomains, isolated from each other.
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Accounts
      </strong>
    </td>
    
    <td>
      Email addresses with mailboxes, passwords, and storage. <a href="/https/smtp.dev/docs/features/account/#plus-sign-aliasing">
        Plus-sign aliasing
      </a>
      
       on every plan, and <a href="/https/smtp.dev/docs/features/account/#catch-all-addresses">
        catch-all
      </a>
      
       on Pro and Max.
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Mailboxes
      </strong>
    </td>
    
    <td>
      Inbox, Sent, Trash, Drafts, Junk by default. <a href="/https/smtp.dev/docs/features/mailbox/">
        Create more
      </a>
      
       as needed.
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Messages
      </strong>
    </td>
    
    <td>
      HTML and plain text views, raw SMTP source, <a href="/https/smtp.dev/docs/features/message/#email-verification">
        SPF/DKIM/DMARC checks
      </a>
      
      , attachments.
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Compose
      </strong>
    </td>
    
    <td>
      Send test emails between accounts from the browser.
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        API Tokens
      </strong>
    </td>
    
    <td>
      Keys for the <a href="/https/smtp.dev/docs/api/">
        REST API
      </a>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Real-time
      </strong>
    </td>
    
    <td>
      New messages are pushed over SSE.
    </td>
  </tr>
</tbody>
</table>

## Next Steps

- [SMTP Test](https://smtp.dev/docs/guides/send-test-email/): send a test email with swaks, curl, or your app's mailer, and read it back.
- [API Quickstart](https://smtp.dev/docs/guides/email-testing-api/): create an inbox per test, wait for the message, and assert on it.
- [CI](https://smtp.dev/docs/guides/ci/), [Playwright](https://smtp.dev/docs/guides/e2e/), and [Cypress](https://smtp.dev/docs/guides/cypress/): the same checks in your pipeline and browser tests.
- [OTP Codes and Magic Links](https://smtp.dev/docs/guides/otp-magic-links/): read the code out of the email and finish the login in a test.
- [Nodemailer](https://smtp.dev/docs/guides/nodemailer/): send from Node and assert on links, headers, and attachments.
- [IMAP and POP3](https://smtp.dev/docs/guides/imap-pop3/): read an inbox by hand with openssl, or from curl, Python, and Node.
- [Local Development](https://smtp.dev/docs/guides/local-development/): one SMTP host for your laptop, CI, and staging.

## Sitemap

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