caelum0x 830e75702a docs(mail): match the live server — plans from /billing/plans, SDK and SMTP marked not yet live, no open-source claim
- limits-pricing, index, migrate-from-resend: Free 3,000/mo, Pro $20 then
  $0.80/1k, Scale $90 for 150,000 then $0.60/1k (the live GET /billing/plans);
  pay-as-you-go, auth-email allowance and Mail Studio grandfathering lines
  removed (not implemented).
- sdk-typescript + quickstart: @scribase/mail is not on npm, marked {soon}.
- test-mode: SMTP submission marked {soon}; "open source (MIT)" and
  "your own install" removed (the source is not published); local dev =
  sk_test_ key against the hosted API.
- build.mjs default base URL -> https://scribase.com/mail/docs/ (published
  there from the scribase www repo, commit 77f1469).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-13 14:36:25 +03:00

41 lines
2.6 KiB
Markdown

---
title: Test mode
nav: Test mode
description: How to test Scribase Mail without sending real email. Test API keys (sk_test_), sandbox recipient addresses that simulate delivery, bounce, delay and complaint, and what is metered.
---
Test mode lets you run your whole integration (send, webhooks, suppression handling) without any message leaving our system.
## Test API keys
Test keys start with `sk_test_`. Create one in the dashboard (API keys, mode "test") or with `POST /api-keys` and `{ "name": "ci", "mode": "test" }`. Every request made with a test key is accepted, validated and logged exactly like production, and your webhooks fire, but nothing is handed to a mail server:
- No domain is required: send from any address on `test.scribase.dev`.
- Sends are stored with `"test": true` (visible in `GET /emails` and `GET /emails/{id}`) and go through a simulated transport.
- Test traffic is not metered against your limits; it only bumps the `emails_test` counter in `GET /usage`.
- Test sends never touch the suppression lists, so a simulated bounce cannot block a real customer later.
- Webhook payloads carry `"test": true` at the top level and inside `data`.
- Test keys will work on the SMTP submission port too (username `scribase`, password the `sk_test_` key) once SMTP submission is live. {soon}
## Sandbox recipients
Recipients on `test.scribase.dev` (alias: `sandbox.scribase.com`) script the outcome so you can exercise every webhook branch:
| Recipient | Result within 5 seconds |
|---|---|
| `delivered@test.scribase.dev` | `email.sent` then `email.delivered` |
| `bounced@test.scribase.dev` | `email.bounced` (550 5.1.1); `last_event` becomes `bounced` |
| `soft-bounce@test.scribase.dev` (alias `delayed@`) | `email.delivery_delayed` (451), then `email.delivered` after the retry |
| `complained@test.scribase.dev` | `email.delivered`, then `email.complained` |
| `suppressed@test.scribase.dev` | `email.suppressed`; nothing is sent |
Any other recipient with a test key behaves like `delivered@`.
## Rehearsing the bounce path on a real message
With a live full-access key you can also report `POST /emails/{id}/events` with `{ "type": "bounced" }` (or `complained`, `delivered`, `delayed`) on a message you sent to yourself. That triggers the same `email.bounced` webhook and suppression as a real DSN, which is how the inbound bounce pipeline reports asynchronous bounces internally.
## Local development
Use an `sk_test_` key against `https://mail-api.scribase.com` from your laptop: nothing is delivered, nothing is metered, and the dashboard shows every simulated send with its events.