Composer 1.0.0

dotnet add package Composer --version 1.0.0                
NuGet\Install-Package Composer -Version 1.0.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="Composer" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Composer --version 1.0.0                
#r "nuget: Composer, 1.0.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.
// Install Composer as a Cake Addin
#addin nuget:?package=Composer&version=1.0.0

// Install Composer as a Cake Tool
#tool nuget:?package=Composer&version=1.0.0                

Composer

This is a framework for .NET to compose an email from a configured template so the email format can be update on the fly without updating the application code.

Usage

First add essential services to IServiceCollection by invoke AddComposer extension method:

services.AddComposer();

AddComposer return an object for configure Composer. The application required to provider IEmailSender and ITemplateProvider by invoke AddSender and AddTemplateProvider:

services
    .AddComposer()
    .AddSender<SenderImplementation>()
    .AddTemplateProvider<TemplateProviderImplementation>();

SMTP sender

SMTP sender is shipped with Composer so you don't need to install additional package to use it. To use SMTP sender invoke AddSmtpSender:

services
    .AddComposer()
    .AddSmtpSender(options =>
    {
        options.SmtpServer = "host";
        options.SmtpPort = 25;
    })
    .AddTemplateProvider<TemplateProviderImplementation>();

Amazon SES sender

For Amazone SES you need to install Composer.Aws then invoke AddAmazonSimpleEmailService:

services
    .AddComposer()
    .AddAmazonSimpleEmailService()
    .AddTemplateProvider<TemplateProviderImplementation>();

You also need to allow ses:SendRawEmail for IAM role that used by your application.

License

MIT

Product Compatible and additional computed target framework versions.
.NET 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Composer:

Package Downloads
Composer.StringTemplate

Template provider for Composer using StringTemplate 4.

Composer.Aws

AWS supports for Composer.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 361 2/25/2022