Stop admin test emails from reaching customers
- Every Brevo sender now runs test sends ([TEST] subject or a test tag)
- through one guard: at most 3 single addresses, each internal, a Katura
- staff user, or listed in TEST_EMAIL_ALLOWLIST. Customers, unknown
- addresses and comma lists are refused before any request to Brevo, and
- the warn log carries a count only. Campaign send-now/schedule (and the
- Brevo list-send helpers) refuse a campaign whose name or subject looks
- like a test.
- The admin test routes default to the signed-in admin's own address,
- return 400 when the guard refuses, and write an audit entry with the
- recipient count (no addresses). The dev console's live abandoned-cart
- test now sends as [TEST] so the same guard applies.
b0a85ddView on GitHub →