FluentEmail.Handlebars 0.1.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package FluentEmail.Handlebars --version 0.1.2
NuGet\Install-Package FluentEmail.Handlebars -Version 0.1.2
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="FluentEmail.Handlebars" Version="0.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FluentEmail.Handlebars --version 0.1.2
#r "nuget: FluentEmail.Handlebars, 0.1.2"
#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.
// Install FluentEmail.Handlebars as a Cake Addin
#addin nuget:?package=FluentEmail.Handlebars&version=0.1.2

// Install FluentEmail.Handlebars as a Cake Tool
#tool nuget:?package=FluentEmail.Handlebars&version=0.1.2

Publish

alt text

FluentEmail Handlebars Plugin

Allows you to use Handlebars rendering engine and author your emails in Handlebars, using the excellent Handlebars.Net.

Basic Usage

var email = Email
    	.From("john@email.com")
    	.To("bob@email.com", "bob")
    	.Subject("hows it going bob")
    	.Body("yo dawg, sup?")
		.Send();

Dependency Injection

You can configure FluentEmail in startup.cs with these helper methods. This will by default inject IFluentEmail (send a single email) and IFluentEmailFactory (used to send multiple emails in a single context) with the ISender and ITemplateRenderer configured using AddHandlebarsRenderer(), AddSmtpSender() or other packages.

public void ConfigureServices(IServiceCollection services)
{
	services
		.AddFluentEmail("fromemail@test.test")
		.AddHandlebarsRenderer()
		.AddSmtpSender("localhost", 25);
}

Using a template

// Using Handlebars templating package (or set using AddHandlebarsRenderer in services)
Email.DefaultRenderer = new HandlebarsRenderer();

var template = "Dear {{Name}}, You are totally {{Compliment}}.";

var email = Email
    .From("bob@hotmail.com")
    .To("somedude@gmail.com")
    .Subject("woo nuget")
    .UsingTemplate(template, new { Name = "Luke", Compliment = "Awesome" });


Using a template with optional partial templates

Registers partial templates described fully here

// Using Handlebars templating package (or set using AddHandlebarsRenderer(templatePath) in services)
Email.DefaultRenderer = new HandlebarsRenderer("some path to templates");
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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.1.3 10,105 6/3/2020
0.1.2 398 6/3/2020