Fake data that must never receive emails? Use a .test or example.com domain. Programmatic access to received emails? Use a programmable inbox, e.g. [email protected]. Simulating bounces and user complaints? Use your email provider’s simulator email addresses. Never invent domains like test.com or fake.com: several route to real companies’ mail servers.
More on each kind of test email address, when to use it, and pitfalls that make tests flaky or leak data to strangers below. It includes a DNS check of the fake domains developers commonly type, copy-paste code for unique addresses per test, and a JSON fixture of valid and invalid addresses for validation tests.
Quick reference: which test email address to use
| Scenario | Use | Example |
|---|---|---|
| Seed data, fixtures, documentation, unit tests (no email should leave) | A reserved domain | [email protected], [email protected] |
| Local development: see exactly what your app sends | Any address plus a local catcher such as Mailpit | [email protected], caught on localhost:1025 |
| End-to-end tests that read the email (signup, OTP, magic link, password reset) | A unique test-inbox API address per test | [email protected] |
| A one-off manual check of a flow | A plus address on a mailbox you own | [email protected] |
| Bounce, complaint and suppression handling | Your provider's simulator addresses | [email protected], [email protected] |
| Email field validation (accept or reject) | A fixture of valid and invalid addresses | "john..doe"@example.com (valid), user@@example.com (invalid) |
| Load or integration tests of the sending call itself | Your provider's sandbox or test mode | SendGrid sandbox_mode, Mailgun o:testmode=yes |
Why invented domains are dangerous
The made-up domains developers most often use in forms turn out to be quite real. When we checked their MX records using Google Public DNS (dns.google) on 2 November 2026, we found that emails to testing.com and user.com are handled by Google Workspace, and emails to abc.com, fake.com and domain.com are handled by Microsoft 365. A test email sent there can reach a stranger’s inbox.
| Domain | Mail record (MX) on 2 Nov 2026 | What happens to a test email |
|---|---|---|
| testing.com | smtp.google.com (Google Workspace) | Accepted or bounced by a real organization's server |
| user.com | aspmx.l.google.com (Google Workspace) | Accepted or bounced by a real organization's server |
| fake.com | Microsoft 365 | Accepted or bounced by a real organization's server |
| abc.com | Microsoft 365 | Accepted or bounced by a real organization's server |
| domain.com | Microsoft 365 | Accepted or bounced by a real organization's server |
| email.com | mail.com servers | Accepted or bounced by a real consumer email provider |
| test.org | mailcow.test.org | Accepted or bounced by a real, self-hosted mail server |
| company.com | No MX, but an A record | Senders fall back to the A record and attempt delivery (RFC 5321, section 5.1) |
| test.com | No MX and no A record | Undeliverable today, but it is a registered domain whose records can change at any time |
| example.com, .net, .org | Null MX (0 .) | Rejected immediately, by design (RFC 7505) |
| anything under .test or .invalid | The domain does not exist | Fails at the DNS lookup |
Lookups via Google Public DNS (dns.google). You can check MX records for any domain using our free DNS checker.
Sending emails to domains you don’t control in your tests can:
- Leak information: one-time codes, password reset links, invoices etc. can end up in someone else’s inbox.
- Hurt your email sending reputation: bounces and complaints register against your domain and IP addresses.
- Make your tests unreliable: you’re relying on someone else’s email server, and can’t access the emails to assert against anyway.
- Put you at risk from a compliance perspective: sending emails containing personal information could violate your data protection commitments.
Reserved domains: the safe choice for fake data
Three second-level domains and four top-level domains are permanently reserved for examples and testing so that nobody can ever register them. Use them for any address that should never receive email.
| Name | Reserved by | Intended for | What happens to mail |
|---|---|---|---|
| example.com, example.net, example.org | RFC 2606 | Documentation and examples | Refused immediately: each publishes a null MX |
| .test | RFC 2606, RFC 6761 | Testing | Never resolves on the public internet; fine in local DNS |
| .example | RFC 2606, RFC 6761 | Documentation | Never resolves |
| .invalid | RFC 2606, RFC 6761 | Names that must be obviously invalid | Never resolves |
| .localhost | RFC 2606, RFC 6761 | The local machine | Resolves to loopback; not for email |
Good uses for reserved-domain addresses:
- Seed data and fixtures like
[email protected]. - Anonymized production data (e.g. before copying it to a staging environment), replacing every real address with
user-<id>@example.com. - Unit tests that don’t send real emails (i.e., using a mocked email transport layer), where you only care about generating syntactically valid email addresses.
- Examples in documentation or screenshots where readers can copy the addresses without sending emails to anyone.
- A fake SMTP server (e.g., Mailpit), since it will accept emails for any recipient address. Using reserved domains such as
.testorexample.comhere too means emails cannot reach anyone if you accidentally point your application at a real email provider.
Many fake data generators can produce these email addresses for you. For example, Python’s Faker library has a safe_email() method, Ruby’s Faker gem (version 3.2 and later) has Faker::Internet.email, and JavaScript’s @faker-js/faker library has faker.internet.exampleEmail().
The limit: emails can’t be received at reserved domains, and some websites won’t allow you to sign up with an email address at one of these domains (they’ll perform an MX lookup to check that the domain can receive email). The next three approaches all involve receiving email at a real inbox.
Plus addressing: good for manual checks, fragile in CI
With plus addressing (subaddressing), [email protected] gets delivered to [email protected], so one inbox can simulate as many different test users as you need. Gmail, Google Workspace, Microsoft 365, Outlook.com, Fastmail, and Proton Mail support plus addressing, and RFC 5233 talks about the "detail" part for filtering purposes.
It’s a convenient way to simulate different users when manually testing one-off sign-up or password reset flows. It becomes fragile when code has to read the inbox:
- Hard to use in CI: you need IMAP or OAuth credentials to connect to a real mailbox, and email providers restrict automated logins.
- All parallel tests share one inbox, so you need to filter carefully and sort out rate limiting as all tests will be sharing the same quota.
- Spam filtering or emails being delivered to different tabs can delay or hide messages and make timing nondeterministic.
- Some websites and apps don’t handle plus addressing well, as they may remove the "+" symbol or not allow it at all. This could result in you testing a different scenario than what actual users will hit.
- Emails will be sent to an employee’s actual inbox, mixed with real mail.
Note: For gmail.com addresses, dots are ignored, so [email protected] will get delivered to [email protected]’s inbox. We wouldn’t count on it to simulate different users, as many apps normalize those addresses.
| Plus address on your mailbox | Programmable test inbox | |
|---|---|---|
| Setup | None | Sign up once for an API key |
| Reading mail from a test | IMAP or provider API with OAuth | One HTTP request |
| Parallel isolation | Filter one shared inbox | Unique address per test |
| Cleanup | Manual | Expires automatically |
| Risk | Test mail in a real person's inbox | Isolated from real mail |
Disposable and public inboxes: quick to use, easy to leak
Websites like Guerrilla Mail, temp-mail and Mailinator (using their public email domain) provide you with an email address that you can immediately start using to receive emails without having to go through a sign-up process. Anyone who knows or guesses the address can read the emails.
They’re a convenient way to get an email address for manually checking if emails were sent and how they look, using throwaway data. Keep in mind:
- Don’t use these email addresses to receive emails with sensitive information (password reset links, one-time codes, invoices, or anything resembling customer data).
- Hard to use in CI: most public tiers don’t have an API, and rate limiting or CAPTCHAs can block automated access to their websites.
- Some websites block disposable domains. They use blocklists like disposable-email-domains to prevent sign-ups using disposable email addresses.
As of 2 November 2026, the disposable-email-domains blocklist contained more than 10,000 email domains, including mailinator.com, mailslurp.com, mailosaur.net, guerrillamail.com, and temp-mail.org, but not inbox.testmail.app. If your product uses a similar list to block sign-ups using disposable email addresses, make sure to check if the email domain used by your email testing tool of choice is blocked and allowlist it in test environments instead of turning off this validation everywhere.
For automated tests, look into getting a private domain through Mailinator or using a private, programmable inbox service like testmail.app (each namespace can only be read using its API key).
Programmable test inboxes: a unique address for every test

The API allows you to get emails received at an address, so each test can have its own real inbox address. With testmail.app, the format is {namespace}.{tag}@inbox.testmail.app, where you can choose any tag within your namespace. This way you don’t have to call any API to set up the test inbox; you can simply use string formatting.
A naming convention that keeps parallel runs apart
| Part | Example | Why it helps |
|---|---|---|
| Namespace | acme | Your account's catch-all; every tag lands here |
| Suite | signup | Groups mail by feature |
| Run ID | 4821 (the CI run's ID, e.g. GITHUB_RUN_ID) | Keeps each CI run's emails apart |
| Unique suffix | 8f3k2c1d | One address per test case |
The API allows you to get all emails received at [email protected] by specifying the tag signup.4821.8f3k2c1d, or with tag_prefix=signup.4821 to get all emails from all signup tests for run 4821.
JavaScript helper (Node.js 18+, no dependencies)
// testInbox.mjs
import { randomUUID } from 'node:crypto';
const NS = process.env.TESTMAIL_NAMESPACE;
const KEY = process.env.TESTMAIL_APIKEY;
const RUN = process.env.GITHUB_RUN_ID ?? 'local'; // isolates parallel CI runs
export function newTestAddress(suite) {
const tag = `${suite}.${RUN}.${randomUUID().slice(0, 8)}`;
return { tag, address: `${NS}.${tag}@inbox.testmail.app`, since: Date.now() };
}
export async function waitForEmail({ tag, since }, timeoutMs = 90_000) {
const url = new URL('https://api.testmail.app/api/json');
url.search = new URLSearchParams({
apikey: KEY,
namespace: NS,
tag,
timestamp_from: String(since),
livequery: 'true',
}).toString();
const res = await fetch(url, { signal: AbortSignal.timeout(timeoutMs) });
const body = await res.json();
if (body.result !== 'success') throw new Error(body.message);
return body.emails[0];
}Python helper (Python 3.9+, requests)
# test_inbox.py
import os
import time
import uuid
import requests
NS = os.environ["TESTMAIL_NAMESPACE"]
KEY = os.environ["TESTMAIL_APIKEY"]
RUN = os.environ.get("GITHUB_RUN_ID", "local") # isolates parallel CI runs
def new_test_address(suite: str) -> dict:
tag = f"{suite}.{RUN}.{uuid.uuid4().hex[:8]}"
return {
"tag": tag,
"address": f"{NS}.{tag}@inbox.testmail.app",
"since": int(time.time() * 1000),
}
def wait_for_email(inbox: dict, timeout: float = 90) -> dict:
params = {
"apikey": KEY,
"namespace": NS,
"tag": inbox["tag"],
"timestamp_from": inbox["since"],
"livequery": "true",
}
deadline = time.monotonic() + timeout
while (left := deadline - time.monotonic()) > 0:
try: # requests' timeout covers one response, so the loop keeps the whole wait under `timeout`
response = requests.get(
"https://api.testmail.app/api/json", params=params, timeout=(10, left), allow_redirects=False
)
except requests.exceptions.ReadTimeout:
break
if response.status_code == 307: # no email within the API's one-minute hold: ask again
continue
if response.status_code != 200:
raise RuntimeError(f"testmail.app answered HTTP {response.status_code}") # no URL, so no key
body = response.json()
if body["result"] != "success":
raise RuntimeError(body["message"])
return body["emails"][0]
raise TimeoutError(f"No email to {inbox['address']} within {timeout} s")In your email test, generate a tag and derive the email address, fill in this address in the form you’re testing and submit it, then wait for the email to arrive:
const inbox = newTestAddress('signup');
// ...fill the signup form with inbox.address and submit...
const email = await waitForEmail(inbox);
// assert on email.subject, email.text or email.htmlThree details make these implementations reliable:
- Both implementations use
timestamp_fromto only get emails received after the start of the test. This way you won’t get stale emails when retrying a test. - Both implementations use
livequery=truewhich makes the API wait for new emails to arrive instead of implementing polling logic yourself. If no email arrives within a minute, the API responds with a 307 redirect to the same URL, and your HTTP client sends the request again, which repeats until an email arrives. That’s why both helpers put a deadline on the whole wait. The JavaScript implementation usesAbortSignal.timeoutwhich will time out also on redirects. The Python implementation retries after each 307 response until its overalltimeout, since the requests timeout only covers a single response. We recommend you also implement a timeout in your test runner (pytest-timeout or your framework’s own timeout). - You don’t have to clean up after your tests. Emails are removed after a retention period (1, 3, or 30 days depending on your plan). There’s also intentionally no delete endpoint, since with unique tags and
timestamp_fromyou shouldn’t need that.
Provider simulators and test modes
Use your email provider’s simulator addresses to test bounces, spam complaints, and auto-replies: they exercise your webhook and suppression logic without affecting your sender reputation. Test modes do something different: they check your API calls without sending anything.
| Provider | Feature | Address or setting | What it simulates |
|---|---|---|---|
| Amazon SES | Mailbox simulator | success@, bounce@, ooto@, complaint@ and [email protected] | Delivery, a hard bounce (SMTP 550 5.1.1), an out-of-office reply, a spam complaint, and a suppression-list bounce |
| Resend | Test addresses | delivered@, bounced@, complained@ and [email protected]; labels such as [email protected] | Delivery, a bounce, a spam complaint, and suppression |
| SendGrid | Sandbox mode | "mail_settings": {"sandbox_mode": {"enable": true}} | Validates the request without delivering; returns 200 OK instead of 202 |
| Mailgun | Test mode | o:testmode=yes | Processes the message normally but does not deliver it |
| Postmark | API test token | Header X-Postmark-Server-Token: POSTMARK_API_TEST | Validates API calls without sending |
Simulator addresses let you test your application’s behaviour when delivery doesn’t succeed. Test inboxes let you test the email content when it does.
Test addresses in auth platforms
Authentication platforms have specific behaviours you should be aware of when sending emails, which can determine whether you receive an email in your test inbox:
| Platform | Built-in test addresses | What it means for email tests |
|---|---|---|
| Clerk | Any address with the +clerk_test subaddress; verification code 424242 | Clerk sends no email to these addresses, not even links. To test a real email, use an inbox you control without +clerk_test. A development instance delivers at most 100 emails a month |
| Supabase | None; locally, every Auth email goes to Mailpit at localhost:54324 | Hosted projects on the default SMTP server only email your organization's team, so configure custom SMTP before using a test inbox |
| Firebase Authentication | None; the Auth emulator sends no email | Read sign-in and verification links from the emulator's oobCodes endpoint, or use a real inbox against a real project |
Test data for email validation: valid and invalid addresses
Use both valid and invalid addresses to test your email validation logic. Here’s an example fixture showing some valid and invalid emails. We’ve separated emails based on whether they’re allowed by RFCs (rfc) from ones which you’d likely want to allow for a typical signup form (accept). For example, IP literals and quoted local parts are allowed, but you’d rarely want to allow them for users to sign up with.
RFC 5321 limits emails to a 64-character local part (the bit before the @), a 255-character domain (split into labels separated by dots, each of which can be at most 63 characters), and a total of 254 characters in practice. RFC 6531 extends this to allow internationalized email addresses such as josé@example.com, but this requires support for SMTPUTF8.
[
{ "address": "[email protected]", "rfc": true, "accept": true, "note": "baseline" },
{ "address": "[email protected]", "rfc": true, "accept": true, "note": "dots between characters" },
{ "address": "[email protected]", "rfc": true, "accept": true, "note": "plus subaddress; do not strip or reject" },
{ "address": "[email protected]", "rfc": true, "accept": true, "note": "hyphen, underscore and digits" },
{ "address": "[email protected]", "rfc": true, "accept": true, "note": "one-character local part" },
{ "address": "[email protected]", "rfc": true, "accept": true, "note": "subdomain" },
{ "address": "[email protected]", "rfc": true, "accept": true, "note": "mixed case; normalize the domain to lowercase" },
{ "address": "josé@example.com", "rfc": true, "accept": true, "note": "needs SMTPUTF8 end to end" },
{ "address": "\"john..doe\"@example.com", "rfc": true, "accept": false, "note": "quoted local part may contain consecutive dots" },
{ "address": "\"much.more unusual\"@example.com", "rfc": true, "accept": false, "note": "quoted local part may contain a space" },
{ "address": "user@[192.0.2.10]", "rfc": true, "accept": false, "note": "IPv4 address literal" },
{ "address": "user@[IPv6:2001:db8::1]", "rfc": true, "accept": false, "note": "IPv6 address literal" },
{ "address": "admin@mailserver1", "rfc": true, "accept": false, "note": "single-label domain, no TLD" },
{ "address": "plainaddress", "rfc": false, "accept": false, "note": "no @" },
{ "address": "@example.com", "rfc": false, "accept": false, "note": "empty local part" },
{ "address": "user@", "rfc": false, "accept": false, "note": "empty domain" },
{ "address": "user@@example.com", "rfc": false, "accept": false, "note": "two @ signs" },
{ "address": "[email protected]", "rfc": false, "accept": false, "note": "leading dot" },
{ "address": "[email protected]", "rfc": false, "accept": false, "note": "trailing dot before @" },
{ "address": "[email protected]", "rfc": false, "accept": false, "note": "consecutive dots, unquoted" },
{ "address": "user [email protected]", "rfc": false, "accept": false, "note": "unquoted space" },
{ "address": "[email protected]", "rfc": false, "accept": false, "note": "empty domain label" },
{ "address": "[email protected]", "rfc": false, "accept": false, "note": "label starts with a hyphen" },
{ "address": "user@exam_ple.com", "rfc": false, "accept": false, "note": "underscore is not allowed in an SMTP domain" },
{ "address": "[email protected].", "rfc": false, "accept": false, "note": "trailing dot in domain" },
{ "address": "user@[300.1.1.1]", "rfc": false, "accept": false, "note": "IPv4 octet above 255" },
{ "address": "\"[email protected]", "rfc": false, "accept": false, "note": "unclosed quote" }
]We’d recommend adding two more generated cases to your test file, one with a 64-character local part (valid) and one with 65 (invalid). Different implementations vary on how they enforce this: in our check, Python’s email-validator 2.3.0 allowed emails with a 65-character local part (it only enforces RFC 5321’s 64-character limit when you pass strict=True), and disallowed admin@mailserver1 (valid syntax, but RFC 5321 only allows fully qualified domain names on the public internet). Be clear on the behaviour you want, and then test it.
These tests will only check that the email address is syntactically valid, not whether it’s deliverable. For that, send an email and read the message.
Which test email address should you use?
Which type you pick depends on three questions: are you actually sending an email, do you need to access the contents of that email in your test, and are you running this test without any human intervention?

In practice, most teams use three out of these four: reserved domains in fixtures, simulator addresses for testing bounces, and a test-inbox service with an API for end-to-end tests. Plus, addressing remains a handy technique for manually accessing emails sent to your own accounts.

Best-practice checklist for test email addresses
Copy this list into your test plan; each item prevents a specific failure we see in real suites.
- ☐ Use email domains reserved for testing, or use email addresses that you control. Do not use real people’s email addresses or made-up domains.
- ☐ Use unique email addresses for different tests. Include your CI run ID in the address.
- ☐ Query for emails received after your test started (using
timestamp_fromor equivalent functionality) so retries don’t read an earlier run’s emails. - ☐ Do not send emails containing personal information, password reset links, verification codes, etc. to publicly-accessible inboxes.
- ☐ Use separate email address namespaces or inboxes for different environments, and use API keys scoped to each.
- ☐ If your application validates that emails are not from disposable domains, allowlist your testing domain in test environments instead of relaxing production validation.
- ☐ Exclude your testing domain from analytics, CRM integrations, marketing email lists, etc.
- ☐ Store inbox API keys as CI secrets, not in source control.
- ☐ Set an overall timeout for any steps waiting for an email to arrive.
- ☐ Use simulators provided by your email service provider to test email bounces and complaints, never by bouncing real mail.
- ☐ Validate email syntax using fixture data, and validate deliverability using a real inbox, as these tests will uncover different classes of bugs.
- ☐ Flag any accounts used for smoke tests against production systems in your database so that cleanup and reporting can skip them.
Frequently asked questions
Is test.com a real email address?
test.com is a real, registered domain, not one of the domains reserved for documentation and testing. As of 2 November 2026, it didn’t have any address (A) or mail exchange (MX) DNS records, so emails sent to that domain would fail, but that could change at any moment depending on what its owner configures. For dummy addresses, use example.com or a .test domain instead.
What is a dummy email address for testing?
A dummy email address is one used only for testing. Use example.com or another reserved domain for addresses that won’t be delivered to anyone; if your test involves sending an email and reading its contents, use a real test inbox that you control.
How do I create a test email address for free?
Any email address you make up at example.com works for fake data. For a real inbox, sign up for testmail.app’s free tier, which gives you a namespace where every tag is a new address and includes 100 emails per month. Use Mailpit if you want a free local server, or plus addressing on a mailbox you already own.
Can I use [email protected] in my app?
Yes. These addresses are good for seed data, fixtures, and examples in documentation. Because example.com has a null MX record, email sent to it will be refused immediately, so don’t use it if your test needs to read the email.
What email address should I use to test a signup form?
If your test scenario involves sending an email and reading its contents (e.g. clicking on a signup confirmation link), use a unique test-inbox address per run that you control. If you are only testing field validation, use a fixture of valid and invalid addresses like the one above.
Do disposable email addresses work for testing?
Disposable email providers offer temporary email addresses that may be useful for quick, manual email tests. However, automated tests using public services are problematic: emails in public inboxes can be read by anyone, public tiers rarely offer an API, and many applications block disposable email domains through blocklists.
How many test email addresses can I create?
For namespace-based test inboxes, you can create an unlimited number of addresses under a common namespace: each new tag gives you a new address without setup. Plus addressing lets you create an unlimited number of variants that all deliver to the same real inbox.
Next steps: wire these addresses into a real end-to-end test with our Playwright or Cypress guides, or compare inbox providers in the best email testing tools for developers.