If you know Bootstrap, you know Bootstrap Email.
This is the .NET Version of Bootstrap Email which was converted from Ruby to .NET (Core) 7/8
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.
Caution
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
There are a few different ways you can use Bootstrap Email to compile emails:
var bsEmail = new BootstrapEmail();
bsEmail.Compile(string.Empty, string.Empty, InputType.File);
var bsEmail = new BootstrapEmail();
bsEmail.Compile("email.html", "out.html", InputType.File);
var bsEmail = new BootstrapEmail();
bsEmail.Compile("emails/*", "mails/compiled/", InputType.Pattern);
var bsEmail = new BootstrapEmail();
bsEmail.Compile("<a href='#' class='btn btn-primary'>Some Button</a>", string.Empty, InputType.String);
> BootstrapEmail.Cli
> BootstrapEmail.Cli -f email.html -d out.html
> BootstrapEmail.Cli -p 'emails/*' -d 'emails/compiled/*'
> BootstrapEmail.Cli -s '<a href="#" class="btn btn-primary">Some Button</a>'
> BootstrapEmail.Cli -c bootstrap-email.json