Welcome to Tallyboard. Confirm your address to finish signing up.
Test the emails your users get.
Your suite signs up to staging with a tagged address, waits for the real email and checks its link and its sender.
// Wait for this run's email, then check itGET /v1/inboxes/inb_7Qa2/messages?since=2026-11-22T14:30:00Z&wait=50200 { "data": [{ "subject": "Confirm your email address" }], "held": { "count": 0 } }// dmarc is pass, and the link goes to stagingtest_verification_email ... ok
qa-runner
QA runner, for Tallyboard's sign-up tests
{ "type": "email.received", "data": { "inbox": { "address": "qa-runner@blueping.dev " }, "message": { "id": "em_4Rt8Wq2L", "to": [ { "address": "qa-runner+run-4821@blueping.dev" } ], "subject": "Confirm your email address", "links": [ { "url": "https://staging.tallyboard.example/verify?t=8f2c", "kind": "verify" } ], "auth": { "dkim": "pass", "dmarc": "pass" } } }}
The staging app's email reaches a tagged address of qa-runner@blueping.dev, the test waits for it with one call, and it passes when the sender is proven and the link points back to staging.
How do I test sign-up, password reset and magic link emails in CI?
Give the pipeline one Blueping inbox, sign up to your staging app with a tagged address such as qa-runner+run-4821@blueping.dev, and wait for the message with GET /v1/inboxes/{id}/messages?since=...&wait=50. The test then asserts on what your users get: the subject, the link and its host, and whether your domain passes SPF, DKIM and DMARC.
Why mocked mailers miss the bugs users hit
Tallyboard's team shipped a template change on a Friday. The unit tests passed, because the mailer was mocked and the mock only checked that send() was called. On Monday, support learned that the password reset links in production pointed at the staging host, and that the new sending domain had never been added to the DKIM setup, so half of the resets went to spam.
Both bugs were in the email itself, in the rendered links and in the headers a receiving server checks, so a mock never saw them. A shared Gmail account would have, but it breaks in CI: OAuth tokens expire, parallel jobs read each other's mail, and a test that polls IMAP every few seconds is slow and flaky.
The test that catches them needs a real address on the public internet, a fresh one for each run, readable from the pipeline with an API key, with the authentication results a recipient's server sees. Tallyboard's pipeline now has one inbox, qa-runner@blueping.dev, and every test writes to a tag of it.
One pipeline, one inbox, one tagged address per test
The test triggers your app as a user would, then reads the email through the API. Blueping supplies the address, the wait and the authentication results.
Create the pipeline's inbox once
The suite's setup asks for the inbox with a fixed
client_id, such asci-signup-tests. Every run gets the same inbox back, which keeps you far from the plan's limit on inbox creations, since deleted inboxes count toward it too.Call: POST
/v1/inboxeswithclient_idAnswer:
201the first time, then200with the sameidandaddressChecked: Inbox creations a day: 20 a day on Free, 100 on Developer, 500 on Startup and 500 on Scale
Build a tagged address for this test
The test adds a
+tagto the inbox's address, such asqa-runner+run-4821@blueping.dev. Mail to any tag reaches the same inbox, and each message keeps the tagged address into, so parallel jobs never read each other's email.Call: None: the address is built from
addressAnswer: A unique address per test, ready for the sign-up form
Checked: Tags are part of the address as written; receive rules on the inbox cover every tag
Trigger the flow in your staging app
The test posts to your app's sign-up, reset or magic link endpoint with the tagged address, the way your front end does. Your app sends through its real mail service, with its real templates and its real domain.
Call: Your app's endpoint, such as POST
/signupAnswer: Your app's own answer
Checked: Your mail service signs the message with your domain's keys
Wait for this test's email
The test reads what arrived since a moment before the trigger, and waits when nothing has. It keeps the message whose
toholds its tagged address, and passesnext_sinceback to wait again if another test's email came first.Call: GET
/v1/inboxes/{id}/messages?since=...&wait=50Answer:
dataoldest first,next_since, andheldwith a count and its reasonsChecked: Authentication and content are checked on arrival; a held message shows in
held.count, never indataAssert on what your users get
auth.verdictequal topassproves your domain's SPF or DKIM lines up with DMARC.linkslists every link with akind, verify and login first, so the test checks the host of the confirmation link. GET/v1/messages/{id}returns the whole text, HTML and headers when a test needs them.Call: GET
/v1/messages/{id}for the full messageAnswer:
text,html,links,codes,authandheadersChecked: The test's own assertions, run on the real email
Step 4's answer, each message cut to the fields the test reads:
{
"data": [
{
"id": "em_4Rt8Wq2Lm6Xc9Vb1",
"direction": "in",
"from": { "address": "no-reply@staging.tallyboard.example", "name": "Tallyboard" },
"to": [{ "address": "qa-runner+run-4821@blueping.dev", "name": null }],
"subject": "Confirm your email address",
"links": [{ "url": "https://staging.tallyboard.example/verify?token=8f2c", "kind": "verify" }],
"auth": { "spf": "pass", "dkim": "pass", "dmarc": "pass", "verdict": "pass" }
}
],
"order": "oldest_first",
"next_cursor": null,
"next_since": "em_4Rt8Wq2Lm6Xc9Vb1",
"held": { "count": 0, "reasons": { "suspicious": 0, "unauthenticated": 0 }, "show_with": "include=held" }
}The test, with unittest and node:test
Both files test the same flow: sign up with a tagged address, wait for the email, check its sender's authentication, its subject and its confirmation link. They read BLUEPING_API_KEY and APP_URL, your staging app's address, from the environment, and need no test framework beyond what Python and Node.js ship.
# test_signup_email.py: sign up to your staging app and check the email it sends.
# Run: python test_signup_email.py
# pip install requests
import os
import unittest
import uuid
from datetime import datetime, timedelta, timezone
import requests
API = "https://blueping.dev/v1"
APP = os.environ["APP_URL"] # your staging app, such as https://staging.example.com
blueping = requests.Session()
blueping.headers["Authorization"] = f"Bearer {os.environ['BLUEPING_API_KEY']}"
class SignupEmail(unittest.TestCase):
@classmethod
def setUpClass(cls):
# One inbox for the pipeline: the same client_id finds it again on every run.
cls.inbox = blueping.post(f"{API}/inboxes", json={"client_id": "ci-signup-tests"}).json()
def email_to(self, address, since):
for _ in range(3):
page = blueping.get(
f"{API}/inboxes/{self.inbox['id']}/messages",
params={"since": since, "wait": 50},
timeout=70,
).json()
self.assertEqual(page["held"]["count"], 0, f"held: {page['held']['reasons']}")
for message in page["data"]:
if address in [to["address"] for to in message["to"]]:
return message
since = page["next_since"] or since
self.fail(f"no email reached {address}")
def test_verification_email(self):
user, domain = self.inbox["address"].split("@")
address = f"{user}+{uuid.uuid4().hex[:8]}@{domain}" # every tag reaches the same inbox
since = (datetime.now(timezone.utc) - timedelta(minutes=5)).isoformat()
requests.post(f"{APP}/signup", json={"email": address}, timeout=30).raise_for_status()
message = self.email_to(address, since)
self.assertEqual(message["auth"]["verdict"], "pass") # SPF or DKIM aligned with DMARC
self.assertIn("Confirm", message["subject"])
verify = [link["url"] for link in message["links"] if link["kind"] == "verify"]
self.assertTrue(verify and verify[0].startswith(APP), verify)
if __name__ == "__main__":
unittest.main()// signup-email.test.mjs: sign up to your staging app and check the email it sends.
// Run: node --test signup-email.test.mjs (Node.js 18 or later)
import assert from "node:assert/strict";
import { randomUUID } from "node:crypto";
import { test } from "node:test";
const API = "https://blueping.dev/v1";
const APP = process.env.APP_URL; // your staging app, such as https://staging.example.com
const headers = { Authorization: `Bearer ${process.env.BLUEPING_API_KEY}`, "Content-Type": "application/json" };
const blueping = async (path, init = {}) => (await fetch(API + path, { headers, ...init })).json();
test("the verification email arrives authenticated, with a link to the app", async () => {
// One inbox for the pipeline: the same client_id finds it again on every run.
const inbox = await blueping("/inboxes", { method: "POST", body: JSON.stringify({ client_id: "ci-signup-tests" }) });
const [user, domain] = inbox.address.split("@");
const address = `${user}+${randomUUID().slice(0, 8)}@${domain}`; // every tag reaches the same inbox
let since = new Date(Date.now() - 5 * 60_000).toISOString();
const signup = await fetch(`${APP}/signup`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ email: address }) });
assert.ok(signup.ok, `sign-up answered ${signup.status}`);
let message;
for (let attempt = 0; attempt < 3 && !message; attempt++) {
const page = await blueping(`/inboxes/${inbox.id}/messages?since=${encodeURIComponent(since)}&wait=50`);
assert.equal(page.held.count, 0, `held: ${JSON.stringify(page.held.reasons)}`);
message = page.data.find((item) => item.to.some((to) => to.address === address));
since = page.next_since ?? since;
}
assert.ok(message, `no email reached ${address}`);
assert.equal(message.auth.verdict, "pass"); // SPF or DKIM aligned with DMARC
assert.match(message.subject, /Confirm/);
const verify = message.links.filter((link) => link.kind === "verify").map((link) => link.url);
assert.ok(verify[0]?.startsWith(APP), String(verify));
});since starts five minutes back so a clock that runs ahead on the CI machine misses nothing; the tagged address keeps the test on its own email. In a job that runs many tests at once, each test builds its own tag and reads the same inbox.
The same pattern tests password resets and magic links: trigger the reset with a tagged address, then find the link by its path, such as /reset-password, which comes sorted as login. The message object lists every field a test can assert on.
Let your coding agent write and run the test
With the MCP server connected, a coding agent can reproduce the flow by hand before it writes the test, and check the email it got against the template it just changed.
Using Blueping, find or create the inbox with client_id ci-signup-tests. Sign up to http://localhost:3000 with a tagged address built from it, wait for the verification email, then report its subject, its sender's SPF, DKIM and DMARC results and every link with its kind. Then write a test that checks the same things.| Tool | What it does here |
|---|---|
create_inbox | Finds the pipeline's inbox by its client_id. |
list_messages | Waits for new mail with since and wait, and counts held mail in held. |
read_message | Returns the whole message: text, HTML, links and headers. |
wait_for_code | Answers at once with the code and the link when the email carries one. |
The tools never send on the agent's behalf here: the sign-up goes through your app, and Blueping only receives and reads.
Fail the build when your own email is held
Tests run when the pipeline runs, but a DNS change can break your domain's DKIM on a Tuesday afternoon. Subscribe an endpoint to email.held with a key that holds held:read, which held mail's events need: every held message, such as one from your app that fails authentication, then reaches your server with its SPF, DKIM and DMARC results, and you can post it to the channel that owns your mail setup. The handler below runs once your server has checked the signature as Webhooks shows.
# held_alarm.py: the part of your webhook server that reports your own email when it is held.
# Check the Blueping-Signature header before calling handle(): /docs/webhooks#verify has the code.
def handle(event):
if event["type"] != "email.held":
return None
message = event["data"]["message"]
auth = message["auth"]
reason = message["safety"].get("held_reason")
line = (
f"{message['from']['address']} held ({reason}): "
f"spf={auth['spf']} dkim={auth['dkim']} dmarc={auth['dmarc']}"
)
print(line) # post it to the channel that owns your mail settings
return lineheld_reason is unauthenticated for a failed check and suspicious for content aimed at a model. Either way the message never reaches data in the test, so the suite and the alarm agree.
Why a test inbox still checks every sender
The checks that protect an agent also make the test stricter than a mock.
Your domain is checked like any other
If your staging mail service signs with its own domain instead of yours, and sends from servers your SPF record doesn't list, DMARC fails. The message is turned away at the door when your DMARC policy asks for that, and held as unauthenticated otherwise. Either way the test fails before your users' mail providers do: on held.count with its reason, or on an email that never arrived.
Anyone can write to a tag
A tag keeps tests apart, and anyone who learns the address can write to it. When the suite should only ever see your app's mail, add a receive allow rule for your sending domain: only senders proven by DMARC or SPF get in, and everything else is turned away before it is stored.
Test mail never answers anyone
The flow above only receives. Nothing in it sends, so a test run can't write to a real person by mistake, and your plan's sends stay untouched.
Old runs go when you choose
On Free, mail is deleted after 90 days, and a paid plan keeps it until you delete it. DELETE /v1/threads/{id} removes a run's messages when a test leaves something you'd rather not keep, and POST /v1/inboxes/batch-delete removes up to 100 of a run's inboxes in one call.
What a busy pipeline needs
Thirty pipeline runs a day with three email tests each bring in about 90 messages a day into one inbox, and send nothing. Storage is the number that grows, by about 50 KB a message.
Free fits this setup: 3 inboxes, 3,000 sends a month and 100 a day, and 3 GB of storage, at no cost. Free adds a one-line footer, Sent with Blueping, to each email it sends; paid plans send without it.
Receiving is never counted, and each recipient of a send counts once. Every limit is on Limits, and every price on Pricing.
The API referenceWebhooksThe MCP serverBlueping vs MailtrapAll use cases
Last checked against the API on .
Questions about email tests
What builders ask before they set it up. The docs answer the rest.
Why test against a real inbox instead of mocking the mailer?
A mock checks that your code called the mailer. The real inbox checks what your users receive: the rendered links, the subject, and whether the receiving side accepts your domain's authentication. Keep the mock for unit tests and add one end-to-end test per email your app sends.
Can parallel jobs share one inbox?
Yes. Each test sends to its own +tag address and keeps the message whose to holds that address. The inbox is shared; the email each test reads is its own.
How long does a test wait?
The call returns as soon as the email lands, and waits 60 seconds at most per call. The tests above try three times before they fail, which covers a slow staging mail queue.
Does it test magic links and password resets?
Yes. Links come sorted by kind: verify for confirmation links, login for sign-in and magic links and for reset links whose address or label reads reset password, other for the rest. Codes in the email come in codes.
What if my app only sends email in production?
The inbox receives mail from the internet, so the test needs an environment that sends through a real mail service, such as staging. A dev server that prints emails to its console never reaches it.
Will the inbox fill up?
Each plan holds a fixed amount of mail. On Free, mail is deleted after 90 days; on a paid plan it stays until you delete it. A pipeline of a few hundred messages a day stays far under it, and deleting threads frees the room at once.
More agents at work
- Signs up for the tools it needs,browser-agent-7
@blueping.dev. The code call, when the email under test carries a code instead of a link. - Checks the emails a branch sends,dev-feature-login
@blueping.dev. The same checks, run by Claude Code, Codex or Cursor while they change your templates. - Pages Tidewell's on-call once,tidewell-alerts
@blueping.dev. An agent that reads the alerts your pipeline and your monitors send.
Give your test suite a real inbox
A tag per test, and the checks your users' mail providers run.