Highlights
Administrators can now edit every mail the application sends, from the admin panel, much like WinterCMS's Mail templates screen. A template, layout or partial can be customized, and resetting it brings back the plugin's file version. Mail that already works keeps working: postcard sends the customized version when there is one and the file otherwise.
Added
- Mail templates screen. It lists every template that plugins register through
pact.HasMailTemplates, one entry per template with a locale switcher, instead of one row per locale. You can customize a template's subject, body and layout and reset it to the file. A notice appears when the plugin's file has changed since the template was customized. - Mail layouts and partials screens. Edit the built-in and plugin layouts and partials, reset them, and create layouts that exist only in the database.
- Finished built-in layouts.
default,systemandminimalnow have a logo header, the site name and a footer. - Branding. Set the brand colours, upload a logo and set a site name. The colours are compiled into the mail CSS, and the layouts show the logo and the name.
- Image library. Upload images and insert them into layouts and templates.
- Preview and test send. Preview any template with sample values in a sandboxed frame, and send a test to your own address.
- CSS inlining. Mail CSS is copied into each element's
styleattribute at render, so clients that strip style blocks, such as Gmail, still show the design. A layout can opt out withdisable_auto_inline_css. - Layouts across plugins. A template's
layoutkey accepts the full code of a layout another plugin registers, for exampleacme.blog::mail.layouts.blog. List that plugin inRequires(). - New admin field types: a code editor (CodeMirror 6, loaded only when needed), a colour picker and a mail image field.
attach.AbsolutePublicURLbuilds an absolute public URL for an upload from the configuration.
Changed
- An unsafe site name never stops a send: it is left out of the mail, a rate-limited warning is logged, and the Branding form refuses to save it. Ordinary text such as "Big Data: Summit" is accepted.
- Mail is checked for
javascript:,vbscript:anddata:URLs only where a URL can actually go (decoded attribute values, CSS, comments, meta tags), not in ordinary text.
Fixed
- If inlining produces output that fails the safety check, the mail is sent with its style block instead of failing.
- The site name in the built-in footer is printed exactly as typed, never read as Markdown.
- Markdown image URLs with parentheses are encoded correctly when inserted from the image picker.