BootstrapEmail.Net 1.7.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package BootstrapEmail.Net --version 1.7.1
                    
NuGet\Install-Package BootstrapEmail.Net -Version 1.7.1
                    
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="BootstrapEmail.Net" Version="1.7.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BootstrapEmail.Net" Version="1.7.1" />
                    
Directory.Packages.props
<PackageReference Include="BootstrapEmail.Net" />
                    
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 BootstrapEmail.Net --version 1.7.1
                    
#r "nuget: BootstrapEmail.Net, 1.7.1"
                    
#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 BootstrapEmail.Net@1.7.1
                    
#: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=BootstrapEmail.Net&version=1.7.1
                    
Install as a Cake Addin
#tool nuget:?package=BootstrapEmail.Net&version=1.7.1
                    
Install as a Cake Tool

BootstrapEmail.NET

logo

If you know Bootstrap, you know Bootstrap Email.

NuGet

build dotnet

This is the .NET Version of Bootstrap Email which was converted from Ruby to .NET (Core) 9/10

Bootstrap Email takes most of its inspiration from these two wonderful frameworks, Bootstrap and Tailwind but for HTML emails. Working with HTML in emails is never easy because of the nuances of email vs the web. With Bootstrap Email you don't have to understand all the nuance and it allows you to write emails like you would a website.

Runtime

By default package contains only the windows x64 Dart Sass runtime. If you have different system then it can use the installed Dart Sass in your system, or you can install one of the following nuget packages:

  • DartSass.Native.win-x64
  • DartSass.Native.win-x86
  • DartSass.Native.linux-x64
  • DartSass.Native.linux-arm64
  • DartSass.Native.linux-arm
  • DartSass.Native.linux-x86
  • DartSass.Native.linux-musl-x64
  • DartSass.Native.linux-musl-arm64
  • DartSass.Native.linux-musl-arm
  • DartSass.Native.linux-musl-x86
  • DartSass.Native.macos-x64
  • DartSass.Native.macos-arm64
  • DartSass.Native.android-x64
  • DartSass.Native.android-arm64
  • DartSass.Native.android-arm
  • DartSass.Native.android-x86

Setup

There are a few different ways you can use Bootstrap Email to compile emails:

Use the dll

compile all files ending in .html in the current directory
var bsEmail = new BootstrapEmail();

bsEmail.Compile(string.Empty, string.Empty, InputType.File);
compile the file email.html and save it to the file out.html
var bsEmail = new BootstrapEmail();

bsEmail.Compile("email.html", "out.html", InputType.File);
specify a path pattern and a destination directory for compiled emails to be saved to
var bsEmail = new BootstrapEmail();

bsEmail.Compile("emails/*", "mails/compiled/", InputType.Pattern);
compile for a string
var bsEmail = new BootstrapEmail();

bsEmail.Compile("<a href='#' class='btn btn-primary'>Some Button</a>", string.Empty, InputType.String);

Via the command line

NuGet

The CLI is published as a .NET tool named BootstrapEmail.Net.Cli, and installs the bootstrap-email command.

install globally
> dotnet tool install --global BootstrapEmail.Net.Cli
update to the latest version
> dotnet tool update --global BootstrapEmail.Net.Cli
options
Option Long form Description
-h --help Set output to verbose messages.
-c --config Relative path to JSON config file to customize Bootstrap Email.
-t --text Return the plain text version of the email.
-s --string HTML string to be compiled rather than a file.
-f --file File to be compiled.
-p --pattern Specify a pattern of files to compile and save multiple files at once (used with --destination).
-d --destination Destination for compiled files (used with the --pattern option).
-v --version Show version.
compile all files ending in .html in the current directory
> bootstrap-email
compile the file email.html and save it to the file out.html
> bootstrap-email -f email.html -d out.html
specify a path pattern and a destination directory for compiled emails to be saved to
> bootstrap-email -p 'emails/*' -d 'emails/compiled/*'
compile for a string
> bootstrap-email -s '<a href="#" class="btn btn-primary">Some Button</a>'
specify a config json file to use custom scss files
> bootstrap-email -c bootstrap-email.json
pipe a file through stdin
> cat input.html | bootstrap-email
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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 is compatible.  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
1.7.2 35 8/11/2026
1.7.1 44 8/11/2026
1.7.0 90 8/8/2026
1.5.5 301 5/24/2025
1.5.4 622 2/22/2025
1.5.3 1,905 5/11/2024
1.5.2 286 5/1/2024
1.5.1 365 4/25/2024
1.5.0 287 4/20/2024
1.4.5 274 4/14/2024
1.4.4 267 4/12/2024
1.4.3 265 4/11/2024
1.4.2 393 4/10/2024
1.4.1 415 11/28/2023
1.4.0 314 9/30/2023

## 1.5.5

-  updated to DartSass 1.89.0