Templateless 0.1.5

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Templateless --version 0.1.5
                    
NuGet\Install-Package Templateless -Version 0.1.5
                    
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="Templateless" Version="0.1.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Templateless" Version="0.1.5" />
                    
Directory.Packages.props
<PackageReference Include="Templateless" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Templateless --version 0.1.5
                    
#r "nuget: Templateless, 0.1.5"
                    
#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.
#:package Templateless@0.1.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Templateless&version=0.1.5
                    
Install as a Cake Addin
#tool nuget:?package=Templateless&version=0.1.5
                    
Install as a Cake Tool

Templateless .NET (C#)

Latest version Github Actions Downloads

What is Templateless?

Templateless lets you generate and send transactional emails quickly and easily so you can ship faster 🚀

✨ Features

  • 👋 Anti drag-and-drop by design — emails are a part of your code
  • Components as code — function calls turn into email HTML components
  • 💻 SDK for any language — use your favorite programming language
  • 🔍 Meticulously tested — let us worry about email client compatibility
  • 💌 Use your favorite ESP — Amazon SES, SendGrid, Mailgun + more
  • 💪 Email infrastructure — rate-limiting, retries, scheduling + more
  • Batch sending — send 1 email or 1,000 with one API call

🚀 Getting started

Install the NuGet package:

Install-Package Templateless

Alternatively, using the .NET CLI:

dotnet add package Templateless

👩‍💻 Quick example

This is all it takes to send a signup confirmation email:

using System;
using System.Threading.Tasks;
using Templateless;

class Program
{
    static async Task Main(string[] args)
    {
        try
        {
            var content = Content.Builder()
                .Text("Hi, please **confirm your email**:")
                .Button("Confirm Email", "https://your-company.com/signup/confirm?token=XYZ")
                .Build();

            var email = Email.Builder()
                .To(new EmailAddress("<YOUR_CUSTOMERS_EMAIL_ADDRESS>"))
                .Subject("Confirm your signup 👋")
                .Content(content)
                .Build();

            var templateless = new TemplatelessClient("<YOUR_API_KEY>");
            var emailIds = await templateless.SendEmailAsync(email);

            Console.WriteLine(string.Join(", ", emailIds));
        }
        catch (TemplatelessException ex)
        {
            Console.WriteLine($"An error occurred: {ex.Message}");
        }
        catch (Exception ex)
        {
            Console.WriteLine($"An unexpected error occurred: {ex.Message}");
        }
    }
}

Note:

  1. Get your free API key here: https://app.templateless.com

  2. There are more C# examples in the examples folder:

    TEMPLATELESS_API_KEY=<YOUR_API_KEY> \
        TEMPLATELESS_EMAIL_ADDRESS=<YOUR_EMAIL_ADDRESS> \
        dotnet run --project ./examples/SimpleExample/SimpleExample.csproj
    

🤝 Contributing

  • Contributions are more than welcome ❤️
  • Please star this repo for more visibility ★

📫 Get in touch

🍻 License

MIT

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows 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.2.0 311 3/22/2024
0.1.5 554 3/6/2024
0.1.4 509 2/27/2024
0.1.3 466 2/16/2024
0.1.2 181 2/14/2024
0.1.1 179 2/13/2024