@vinumcms/mail
v0.20.0
Published
Optional: newsletter subscribers, mailings, email block schema and the pure HTML renderer.
Readme
@vinumcms/mail
Optional. Newsletter subscribers, mailings, an email block registry, and a pure renderer that emits table-based, inline-styled HTML.
export const mail = registerMail(defineMail({ vinum, secret: env("SESSION_SECRET") }));
// app/routes.ts
const m = mailRoutes();
export default [
...m.publicRoutes,
...vinumRoutes({ adminChildren: m.adminChildren }), // nest inside the admin layout
] satisfies RouteConfig;Genuinely optional: @vinumcms/admin does not import this package, so a host
that sends no email ships none of it.
An email block carries two renderers — html for what gets sent, Render
for the authoring canvas. They are separate because contentEditable needs real
DOM and email clients need bulletproof tables, and no single component does both
well.
The html half builds markup by concatenation, so escaping is manual and runs
before formatting is applied. That is the one place in Vinum where the
no-raw-HTML invariant could fail, and most of this package's tests are about it.
Setup and theming live in @vinumcms/admin, which carries the
getting-started guide for all of Vinum.
