BootstrapEmail.Net
1.7.1
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
<PackageReference Include="BootstrapEmail.Net" Version="1.7.1" />
<PackageVersion Include="BootstrapEmail.Net" Version="1.7.1" />
<PackageReference Include="BootstrapEmail.Net" />
paket add BootstrapEmail.Net --version 1.7.1
#r "nuget: BootstrapEmail.Net, 1.7.1"
#:package BootstrapEmail.Net@1.7.1
#addin nuget:?package=BootstrapEmail.Net&version=1.7.1
#tool nuget:?package=BootstrapEmail.Net&version=1.7.1
BootstrapEmail.NET

If you know Bootstrap, you know Bootstrap Email.
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
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 | Versions 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. |
-
net10.0
- AngleSharp (>= 1.7.1)
- Citizen17.DartSass (>= 3.1.0)
- DartSass.Native.win-x64 (>= 1.102.0)
- HtmlAgilityPack (>= 1.12.4)
- PreMailer.Net (>= 2.7.3)
-
net9.0
- AngleSharp (>= 1.7.1)
- Citizen17.DartSass (>= 3.1.0)
- DartSass.Native.win-x64 (>= 1.102.0)
- HtmlAgilityPack (>= 1.12.4)
- PreMailer.Net (>= 2.7.3)
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