Composer 1.0.0
dotnet add package Composer --version 1.0.0
NuGet\Install-Package Composer -Version 1.0.0
<PackageReference Include="Composer" Version="1.0.0" />
paket add Composer --version 1.0.0
#r "nuget: Composer, 1.0.0"
// 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 | Versions 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. |
-
net6.0
- MailKit (>= 3.1.1)
- Microsoft.Extensions.Options (>= 6.0.0)
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 | 363 | 2/25/2022 |