Mail and PDF templates change in the browser now
Every mail and PDF in a Kumiko app comes from a template in the database. Admins change text, logo, layout and attachments in the browser, check the result with sample values and publish it without a deploy.
The wording of a password-reset mail or an invoice PDF used to live in code. Changing one sentence meant a release.
Now every mail and every PDF is a template with a language, the content and a few settings such as subject, sender, page format and margins. A feature declares which placeholders its template needs and ships a default version. The editor shows the placeholders on the left, the content in the middle and the settings on the right.
A missing required placeholder blocks publishing. Saving a draft still works, and the active version keeps going out until the draft is published. The preview fills the placeholders with sample values, and a test mail goes to your own address.
Layouts and letterheads are templates of their own. They take logo, colours and footer from the tenant’s branding, so one change reaches every mail. PDFs are rendered by a Puppeteer service, and each generated PDF records the template version it came from.
By default only the platform admin edits templates. An app can open single templates to tenant admins, for example the invoice mail, and keep the rest as shipped.
The editors, the preview and the PDF rendering are part of the open framework. In Kumiko Enterprise the assistant can also change a template from a sentence. It shows the result as a preview and saves it as a draft, and publishing stays with the user. Enterprise also previews a template with a real record from the app.
Related