RazorEngine
PreMailer.Net
Our great sponsors
RazorEngine | PreMailer.Net | |
---|---|---|
4 | 3 | |
2,114 | 641 | |
- | 0.5% | |
0.0 | 7.8 | |
almost 3 years ago | 3 days ago | |
C# | C# | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
RazorEngine
-
C# Library for Go template
There's a load of packages to do it for example https://github.com/Antaris/RazorEngine
-
How to generate PDF and HTML in 2023?
For HTML, you can use Razor from ASP.NET, either by making a web application you call with the data to get backthe page (microservice approach) or by shoving the Razor engine into your current application and rendering to strings.
- Rendering HTML (C# windows forms) not working after deploy
-
New library: BlazorTemplater
Sorry! I only realised the need on Monday when my .NET Standard Library that contains .cshtml templates broke when I added .razor support. I use RazorLight and used to use RazorEngine before that.
PreMailer.Net
-
Preview rendered .cshtml with the same style restrictions that email clients use
If you don't already know about it, go check out PreMailer.net. It's a handy tool you can use to adjust styles to be more likely to work in email clients.
-
Reporting group membership for critical Active Directory groups
Up until now I've just been working with CSS which I was able to use in email by finding a tool that converts it to in-line style attributes (https://github.com/milkshakesoftware/PreMailer.Net)
-
New library: BlazorTemplater
CSS classes can be used in the generated code but CSS support in rendered HTML emails is very patchy and inconsistent. You should use a tool like PreMailer.NET to inline the CSS.
What are some alternatives?
RazorLight - Template engine based on Microsoft's Razor parsing engine for .NET Core
MailKit - A cross-platform .NET library for IMAP, POP3, and SMTP.
scriban - A fast, powerful, safe and lightweight scripting language and engine for .NET
FluentEmail - All in one email sender for .NET. Supports popular senders (SendGrid, MailGun, etc) and Razor templates.
DotLiquid - .NET Port of Tobias Lütke's Liquid template language.
MimeKit - A .NET MIME creation and parser library with support for S/MIME, PGP, DKIM, TNEF and Unix mbox spools.
SmartFormat.NET - A lightweight text templating library written in C# which can be a drop-in replacement for string.Format
postal - Email sending for asp.net mvc using the view engine system to render emails.
Handlebars.Net - A real .NET Handlebars engine
StrongGrid - Strongly typed library for the entire SendGrid v3 API, including webhooks
Mustache Sharp - An extension of the mustache text template engine for .NET.
BlazorTemplater - A library that generates HTML (e.g. for emails) from Razor Components