Expand description
Product-neutral mail template registration and rendering helpers.
Products still own template codes, default subject/body content, runtime configuration keys, payload types, URLs, and localization. This module only provides the shared mechanics around a registered template catalog: variable metadata, placeholder substitution, HTML escaping, and text fallback generation.
Structs§
- Mail
Template Catalog - Runtime-composed template registry built from product and subsystem registrations.
- Mail
Template Catalog Builder - Builder used by products to assemble a mail template catalog from multiple subsystems.
- Mail
Template Definition - Registered metadata for one product mail template.
- Mail
Template Registry - A product-owned template registry.
- Rendered
Mail - Rendered mail bodies produced from a template and placeholder values.
- Template
Placeholder Set - Placeholder values for a render pass.
- Template
Variable Group - Variable metadata for one registered template.
- Template
Variable Item - Variable metadata exposed to product admin UIs.
- Template
Variable Spec - One placeholder accepted by a template.
Enums§
- Mail
Template Registry Error - Validation error returned when a template registry has ambiguous registrations.
Functions§
- escape_
html - Escapes text for insertion into HTML templates.
- html_
to_ text - Converts simple HTML email content into a plain-text fallback.
- render_
placeholders - Replaces
{{key}}placeholders with provided values. - render_
template - Renders a subject and HTML template with placeholder values and derives text fallback.
Type Aliases§
- Mail
Template Registrar - Function exported by a product subsystem to register its mail templates.