Skip to content

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

License

Notifications You must be signed in to change notification settings

Atrox/kuvert.net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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