Transmitly.TemplateEngine.Scriban 0.3.0

dotnet add package Transmitly.TemplateEngine.Scriban --version 0.3.0
                    
NuGet\Install-Package Transmitly.TemplateEngine.Scriban -Version 0.3.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Transmitly.TemplateEngine.Scriban" Version="0.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Transmitly.TemplateEngine.Scriban" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Transmitly.TemplateEngine.Scriban" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Transmitly.TemplateEngine.Scriban --version 0.3.0
                    
#r "nuget: Transmitly.TemplateEngine.Scriban, 0.3.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Transmitly.TemplateEngine.Scriban@0.3.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Transmitly.TemplateEngine.Scriban&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Transmitly.TemplateEngine.Scriban&version=0.3.0
                    
Install as a Cake Tool

Transmitly.TemplateEngine.Scriban

Transmitly.TemplateEngine.Scriban adds Scriban templating support to the core Transmitly library.

This package is typically used alongside:

  • Transmitly
  • a Transmitly channel provider such as Transmitly.ChannelProvider.Smtp, Transmitly.ChannelProvider.SendGrid, or Transmitly.ChannelProvider.Infobip

Install

dotnet add package Transmitly
dotnet add package Transmitly.TemplateEngine.Scriban
dotnet add package Transmitly.ChannelProvider.Smtp

Quick Start

using Transmitly;
using Transmitly.ChannelProvider.Smtp.Configuration;

ICommunicationsClient client = new CommunicationsClientBuilder()
	.AddSmtpSupport(options =>
	{
		options.Host = "smtp.example.com";
		options.Port = 587;
		options.UserName = "smtp-user";
		options.Password = "smtp-password";
	})
	.AddScribanTemplateEngine()
	.AddPipeline("order-shipped", pipeline =>
	{
		pipeline.AddEmail("orders@my.app".AsIdentityAddress("Orders"), email =>
		{
			email.Subject.AddStringTemplate("Order {{orderNumber}} has shipped");
			email.HtmlBody.AddStringTemplate(
				"""
				<p>Hello {{firstName}},</p>
				{{ if trackingUrl }}
				<p>Your order has shipped. <a href="{{trackingUrl}}">Track package {{trackingNumber}}</a>.</p>
				{{ else }}
				<p>Your order has shipped.</p>
				{{ end }}
				"""
			);
			email.TextBody.AddStringTemplate("Hello {{firstName}}, your order {{orderNumber}} has shipped.");
		});
	})
	.BuildClient();

var result = await client.DispatchAsync(
	"order-shipped",
	"customer@example.com".AsIdentityAddress("Ava Example"),
	new
	{
		firstName = "Ava",
		orderNumber = "A10023",
		trackingNumber = "1Z999",
		trackingUrl = "https://carrier.example/track/1Z999"
	});

Registration

Use either registration style:

new CommunicationsClientBuilder()
	.AddScribanTemplateEngine();
new CommunicationsClientBuilder()
	.TemplateEngine.AddScribanTemplateEngine();

Options

AddScribanTemplateEngine(options => ...) accepts ScribanOptions.

Important settings:

  • UseLiquidTemplates: parse Liquid-style templates with Scriban.
  • ThrowIfTemplateError: controls whether invalid templates throw ScribanTemplateEngineException or return null.
  • LexerOptions and ParserOptions: pass through to Scriban.
  • MemberRenamer and MemberFilterDelegate: control how the content model is exposed to templates.

Template Sources

The engine works with the normal Transmitly template registration APIs:

  • AddStringTemplate(...)
  • AddEmbeddedResourceTemplate(...)
  • AddTemplateResolver(...)

Behavior Notes

  • Templates render against context.ContentModel.Model.
  • By default, invalid templates throw ScribanTemplateEngineException.
  • A null content model is allowed; missing values render as empty output.
  • The current Transmitly core supports only one template engine registration per CommunicationsClientBuilder.

Copyright (c) Code Impressions, LLC. This open-source project is sponsored and maintained by Code Impressions and is licensed under the Apache License, Version 2.0.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.3.0 87 3/25/2026
0.2.2-13.3791bb4 39 3/21/2026
0.2.1 164 7/29/2025