Skip to content

feat(sequences): send a test of a broadcast or sequence email - #84

Merged
clbotdev merged 1 commit into
mainfrom
issue-34-test-send
Oct 19, 2026
Merged

clbotdev merged 1 commit into
mainfrom
issue-34-test-send

Conversation

@clbotdev

Copy link
Copy Markdown
Contributor

Closes #34. Part of #79.

There was no way to send yourself a broadcast or sequence email before launching it.

  • POST /sequences/:id/emails/:emailId/test and MCP send_sequence_email_test: render exactly like a real send (merge tags, footer, tracking) through the delivery source the real send would use, with a [Test] subject. Defaults to the signed-in user, up to 5 addresses; suppressed addresses are skipped; capped at 50 test recipients per team per hour.
  • Tracking tokens use a contact id that matches nobody and the unsubscribe link uses a test token whose page explains it was a test, so tests never touch stats or subscriptions.
  • sequence_emails.last_test_sent_at (migration 0010) is exposed as lastTestSentAt.
  • "Send test" dialog in the broadcast editor and the full-screen email editor (saves pending changes first).
  • The per-recipient render pipeline moves to mail/campaign.ts, shared by real and test sends.

Testing

  • Unit: test-send service (recipients, suppression, tracking ids, lastTestSentAt), REST mapping, MCP tool, test unsubscribe page.
  • Browser E2E: dialog prefills my address; sending to two addresses delivers [Test] <title> to both in Mailpit with the footer and the test unsubscribe link (page says "This was a test email"); the broadcast stays a draft and shows "Last test sent"; a test from the full-screen sequence editor arrives too.

POST /sequences/:id/emails/:emailId/test (and the MCP tool
send_sequence_email_test) renders the email exactly like a real send,
through the delivery source the send would use, with a [Test] subject.
It defaults to the signed-in user, takes up to five addresses, skips
suppressed ones and is capped at 50 recipients per team per hour.

Tracking tokens carry a contact id that matches nobody and the
unsubscribe link uses a test token whose page explains it was a test.
The email records lastTestSentAt. The broadcast editor and the
full-screen email editor get a Send test dialog.

The per-recipient render pipeline moves to mail/campaign.ts so real and
test sends share it.

Refs #34, #79
@clbotdev
clbotdev merged commit b8c499b into main Oct 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Send a test of a broadcast or sequence email to yourself

2 participants