BootstrapEmail.Net.Cli 1.7.1

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global BootstrapEmail.Net.Cli --version 1.7.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local BootstrapEmail.Net.Cli --version 1.7.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=BootstrapEmail.Net.Cli&version=1.7.1
                    
nuke :add-package BootstrapEmail.Net.Cli --version 1.7.1
                    

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.

This package has no dependencies.

Version Downloads Last Updated
1.7.2 32 8/11/2026
1.7.1 42 8/11/2026

## 1.5.5

-  updated to DartSass 1.89.0