Ported from BootstrapEmail. Their excellent templates compile fine under .NET. Highly recommend checking them out!
If you know Bootstrap, you know Bootstrap Email.
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.
There are a few different ways you can use Bootstrap Email to compile emails:
Add NuGet package UnDotNet.BootstrapEmail
to your project
using UnDotNet.BootstrapEmail;
var compiler = new BootstrapCompiler(source);
// both htlm & plaintext
var result = compiler.Multipart();
// only text
var text = compiler.Text();
// only html
var text = compiler.Html();
- SASS compilation: currently, the SASS is compiled to CSS in the project and not re-compiled on every build. My goal is to make this fast enough to run as needed rather than saving the compiled html somewhere.
- Options: The options from BootstrapEmail.com are all related to SASS compilation so they are not currently implemented either.
For full documentation, visit bootstrapemail.com