Test mode

Send to test addresses that play delivery, bounces, complaints, suppression and delays, to test your integration and webhooks for free, without mailing anyone.

Test addresses let you try every delivery outcome without sending mail to a real person. Send to an address at test.mail.exx.sh and exx.sh plays the outcome its name asks for: the email gets the same statuses, attempts and webhooks as a real one, but no message leaves exx.sh. Emails to test addresses are free: they do not count against your daily or monthly quota and are never billed.

The addresses

AddressWhat happensWebhooks
delivered@test.mail.exx.shDelivered. So is any other name at the domain.email.delivered
bounced@test.mail.exx.shBounces hard (550 5.1.1). The address never joins your suppression list.email.bounced
complained@test.mail.exx.shDelivered, then reported as spam.email.delivered, then email.complained
suppressed@test.mail.exx.shSuppressed: nothing is sent.email.suppressed
greylisted@test.mail.exx.shGreylisted on the first attempt (451 4.7.1), delivered on the retry.email.delivery_delayed, then email.delivered
delayed@test.mail.exx.shDeferred on the first attempt (451 4.3.0), delivered on the retry.email.delivery_delayed, then email.delivered

Add a label after a + to tell your tests apart: bounced+signup-flow@test.mail.exx.sh behaves like bounced@test.mail.exx.sh. Any other name at the domain is delivered.

Send to a test address

Test addresses work with the API, the SDKs and SMTP, like any other recipient:

curl -X POST "https://api.exx.sh/emails" \
  -H "Authorization: Bearer $EXX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "Acme <hello@acme.com>",
    "to": ["delivered@test.mail.exx.sh", "bounced+signup@test.mail.exx.sh"],
    "subject": "Testing",
    "text": "Hello"
  }'

An email can mix test addresses and real ones. Each test address plays its outcome, and each real address is delivered and counted as usual.

What is free, and what still applies

  • Not counted, not billed. Test addresses are left out of your usage: the daily and monthly quotas, the limits of a new organization, and billing. An email with only test addresses is accepted even when your quota is spent. An email with both counts its real recipients only. The usage page shows real recipients only.
  • The usual rules. The from address must be on a verified domain of the project, or be the sandbox sender, onboarding@mail.exx.sh, which may send to test addresses as well as to your organization's owners, up to 100 emails a day. Your plan's streams, the content checks and idempotency keys apply as usual.
  • Only this domain. Addresses at a subdomain such as x.test.mail.exx.sh, or at a domain that only looks like it, are real recipients: delivered and counted.
  • Never suppressed. bounced@ and complained@ never join your suppression list, however often you use them, and test addresses never count toward the bounce and complaint rates that can pause a project (deliverability).
  • In your metrics. Delivery metrics count them like any recipient, under the test mailbox provider (metrics).

Limits

Because they are free, test addresses have limits of their own per organization, apart from your plan's request rate and quotas. Real recipients never use them.

LimitValue
Test recipients a second2, with bursts of up to 100
Test recipients a day (UTC)5,000
Size of an email to test addresses only1 MiB

Every test address of an email counts, and a batch counts all of its test addresses at once: a batch with more than 100 of them is refused with 422 validation_error; split it. An email with real recipients too keeps the normal size limit. The rate is checked before the other checks of a request, so a request refused for another reason, such as an unverified domain, still counts against it.

Over the rate or the day, the API answers 429 rate_limit_exceeded with a retry-after header: seconds until the rate allows the email again, or until midnight UTC for the day.

{
  "statusCode": 429,
  "name": "rate_limit_exceeded",
  "message": "Too many recipients at test addresses (test.mail.exx.sh). Please limit the number of test emails per second."
}

Over the day, the message says … today. The daily limit is 5,000. SMTP answers 451 4.7.0 too many recipients at test addresses, with the seconds to wait. Retry after the wait; the SDKs do this for you, and a retry with the same Idempotency-Key runs again instead of getting the 429 back. An email to test addresses only over the size limit is refused with 422 validation_error (SMTP 552 5.3.4).

Attempts and transcripts

Every email to test addresses has its delivery attempts, as GET /emails/{id}/attempts shows them, with mx_host set to test-address. Each attempt has a short SMTP transcript at GET /emails/{id}/attempts/{attempt_id}/transcript: the commands a real delivery sends and the replies of the outcome, such as 550 5.1.1 at RCPT for bounced@. These transcripts are simulated, and say so with "simulated": true.

Common questions

Do test emails count toward my plan?

No. Only real recipients count against your quotas and appear on your bill.

Can I test without a verified domain?

Yes: send from the sandbox sender, onboarding@mail.exx.sh, to test addresses. To send from your own address, verify its domain first (domains).

How long until a greylisted or delayed address is delivered?

The retry follows the usual delivery schedule (how delivery works); a greylisted address is retried after 5 minutes.

On this page