Sending with Templates
The simplest way to send a template:{{first_name}}). If a required merge tag is missing from the array, the tag renders as an empty string in the sent email. See Merge Tags & Template Language for the full syntax including conditionals and loops.
Type-Safe Templates
Generate enums, DTOs, and Mailable classes from your templates for compile-time safety:Type Safety
Generate enums, DTOs, and Mailables for compile-time safety
Template Versioning
Specify a template version to use a specific iteration:- Production safety — Pin to a known-good version so publishing a new draft doesn’t affect live emails
- A/B testing — Send different versions to different cohorts and compare metrics in Analytics
- Gradual rollout — Test a new version with a subset of users before publishing it as the active version
Pull Templates Locally
Download templates from Lettr to edit locally as Blade files:--template=slug- Pull a specific template--as-html- Save as HTML instead of Blade--with-mailables- Also generate Mailable classes
resources/views/emails/lettr/. HTML files go to resources/templates/lettr/. Both paths are configurable in config/lettr.php.
Listing Templates
Retrieve available templates via the API:mergeTags property returns an array of merge tag names defined in the template, which is useful for validating your substitution data before sending.
What’s Next
Type Safety
Generate enums, DTOs, and Mailables for compile-time safety
Template Language
Full merge tag syntax including conditionals and loops
Projects & Folders
Organize templates into projects
Topol Editor
Design templates visually in the Lettr dashboard