MailStencil

Storage-agnostic, strongly typed email templates for .NET.

MailStencil is a .NET 10 library that retrieves templates from pluggable storage, validates them against strongly typed model contracts, caches source templates, and renders them with Scriban. It returns rendered content and does not send email.

Retrieve -> Validate -> Cache -> Render

Packages

Package Purpose
MailStencil.Core Contracts, dependency injection, localization fallback, and source caching
MailStencil.Scriban Bounded Scriban rendering and static validation
MailStencil.FileSystem Restrictive read-only filesystem template reader
MailStencil.AzureBlob Read-only Azure Blob template reader using an application-owned client

MailStencil 0.1.0-preview.1 is available on NuGet.org. It is a preview release, and APIs may evolve before 1.0.