MailStencil.Scriban
0.1.0-preview.1
dotnet add package MailStencil.Scriban --version 0.1.0-preview.1
NuGet\Install-Package MailStencil.Scriban -Version 0.1.0-preview.1
<PackageReference Include="MailStencil.Scriban" Version="0.1.0-preview.1" />
<PackageVersion Include="MailStencil.Scriban" Version="0.1.0-preview.1" />
<PackageReference Include="MailStencil.Scriban" />
paket add MailStencil.Scriban --version 0.1.0-preview.1
#r "nuget: MailStencil.Scriban, 0.1.0-preview.1"
#:package MailStencil.Scriban@0.1.0-preview.1
#addin nuget:?package=MailStencil.Scriban&version=0.1.0-preview.1&prerelease
#tool nuget:?package=MailStencil.Scriban&version=0.1.0-preview.1&prerelease
MailStencil.Scriban
Scriban 7.4.0 rendering and AST validation for declared .NET model contracts.
services.AddMailStencil().AddScribanRenderer();
var content = new EmailTemplateContent("Hello {{ customer_name }}", textBody: "Welcome!");
var validation = await validator.ValidateAsync<CustomerModel>(content, cancellationToken);
if (validation.IsValid)
{
var rendered = await renderer.RenderAsync(content, model, CultureInfo.InvariantCulture, cancellationToken);
}
Resolve ITemplateValidator and ITemplateRenderer through DI. Default naming is Scriban snake_case.
Only declared public readable properties and typed collections are projected into detached script
objects/arrays; methods and runtime subtype additions are unavailable. Validation and rendering
share one internal model schema. No storage access, fallback, caching or email sending is implemented.
The supported language is intentionally restricted: no include, eval, dynamic invocation, CLR method
access, or model mutation. MailStencil does not automatically HTML-escape values; use html.escape for
untrusted values inserted into an HTML body.
See the MailStencil repository for complete setup, storage-provider registration, security limits, and samples.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- MailStencil.Core (>= 0.1.0-preview.1)
- Scriban (>= 7.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.1 | 0 | 9/10/2026 |
First public preview candidate of MailStencil's read-only runtime, renderer, and storage providers.