The template that broke quietly
Mail that lives in a vendor dashboard has no link to the code. A field gets renamed, and weeks later someone receives a message with a placeholder in it. Typed templates fail the build instead.
Uitnodigingen, meldingen, exportlinks, rapportleveringen.
Growth-OS stuurt mail voor een kleine set dingen: een collega uitnodigen, een melding waar iemand zich op abonneerde, een link naar een data-export, een dashboardrapport, een verlofnotitie. Sjablonen zijn getypeerde componenten in de repository met één gedeelde responsieve opmaak, dus er een aanpassen is een gewone codewijziging met review en historie.
Het mechanisme van begin tot eind, zoals het in de repository is geïmplementeerd.
Pick or write a template
Typed components take props for names, amounts and links. Five shared templates use one responsive layout, and the local preview shows desktop, mobile, text and source.
Send from the server
A server service or background job calls one helper with the component, a recipient and a subject. The helper reads server-only configuration, so it cannot end up in browser code.
It renders and delivers
The helper renders the component to HTML with a plain-text alternative and hands it to the provider. A provider error is rethrown so the calling job owns the retry.
Unconfigured is a skip, not a lie
Without a key or a from-address the helper logs a development warning and returns without claiming a delivery happened.
Interactief voorbeeld
Deze rondleiding toont het geïmplementeerde backendcontract zonder account, credentials of providercalls.
Interactief voorbeeld
Alleen deterministische voorbeelddata. De interactie gebruikt geen account-, provider- of netwerkverbinding.
Zonder een gedeelde basis bouwt elk team deze randgevallen opnieuw, en anders.
Mail that lives in a vendor dashboard has no link to the code. A field gets renamed, and weeks later someone receives a message with a placeholder in it. Typed templates fail the build instead.
Each feature spinning up its own client means from-addresses drift, errors are swallowed differently, and changing provider becomes a hunt. One helper is one place to change.
An app that crashes at boot without an email key forces everyone to either hold production credentials or wrap every send in a condition. Here a missing key turns a send into a logged skip.
Kernpunten
Five shared templates live in the repository as typed components with matching MJML variants. Renaming a field they use fails the build instead of sending a broken line to someone.
Every feature and background job sends through the same helper, so the from-address, rendering and error handling live in one place.
Without an email key a send logs a warning and returns. Local work and tests run without production credentials, and nothing pretends a message was delivered.
Technische garanties
Deze pagina toont hoe een sjabloon eruitziet; ze verstuurt nooit iets. Of een bericht een inbox bereikt, hangt af van de domeininstellingen en de provider, en dat valt buiten deze code. Campagnes in de werkruimte zijn iets anders en versturen nog steeds helemaal niets.
De grens hierboven is geen claim maar code. Deze bestanden dragen het contract:
src/lib/email.tssrc/lib/email/templatessrc/features/privacy/jobs.tsDeze functies delen contracten en grenzen met deze pagina.
De documentatie beschrijft dezelfde contracten die deze pagina demonstreert.