Skip to content

Atrox/kuvert.net

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Kuvert

Build Status Latest Version Coverage Status

Kuvert is a library that generates clean, responsive HTML & plain-text for sending transactional emails.

Samples

TODO: images

Installation

dotnet add package Kuvert

Dependency Injection

You can configure Kuvert in Startup.cs. Now IKuvert will be correctly injected.

services.AddKuvert(options =>
{
    options.Product = new Product("my product", "https://example.com"));
}).AddDefaultTemplate();

Usage

TODO: usage

var (html, text) = await kuvert.Generate(
    new Email()
    {
        PreHeader = "Pre header text...",
        Header = new Header()
        {
            Greeting = "Hey",
            Name = "Test User",
        },
        Intros = new List<string>()
        {
            "Test Intro 1",
            "Test Intro 2"
        },
        Dictionary = new List<(string, string)>()
        {
            ("key", "value"),
            ("key2", "value2"),
        },
        Actions = new List<EmailAction>()
        {
            new EmailAction()
            {
                Instructions = "Test Instruction",
                Button = new EmailButton()
                {
                    Text = "Test Button",
                    Link = "https://example.com/testbutton"
                }
            }
        },
        Outros = new List<string>()
        {
            "Test Outro 1",
            "Test Outro 2"
        },
    }
);

About

Kuvert is a library that generates clean, responsive HTML & plain-text for sending transactional emails.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published