
Mjml Email Templates
Handles MJML email template rendering in .NET using the Mjml.Net library. Sets up a template system with a shared layout for headers and footers, embeds MJML files as resources, and includes a renderer that does variable substitution before compiling to cross-client HTML. The composer pattern example is solid, keeping strongly-typed business logic separate from template rendering. The layout injection approach (replacing a {{Content}} placeholder) is simple and works well for transactional emails. If you're building signup confirmations, password resets, or billing emails and want something more maintainable than raw HTML strings, this gives you a clean foundation without much ceremony.
- skills.sh installs
- 513
- GitHub stars
- 1.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add aaronontheweb/dotnet-skills --skill mjml-email-templates --agent claude-codeInstalls into .claude/skills of the current project.
Files
MJML Email Templates
When to Use This Skill
Use this skill when:
- Building transactional emails (signup, password reset, invoices, notifications)
- Creating responsive email templates that work across clients
- Setting up MJML template rendering in .NET
Related skills:
aspire/mailpit-integration- Test emails locally with Mailpittesting/verify-email-snapshots- Snapshot test rendered HTML
Why MJML?
Problem: Email HTML is notoriously difficult. Each email client (Outlook, Gmail, Apple Mail) renders differently, requiring complex table-based layouts and inline styles.
Solution: MJML is a markup language that compiles to responsive, cross-client HTML:
<!-- MJML - simple and readable -->
<mj-section>
<mj-column>
<mj-text>Hello {{UserName}}</mj-text>
<mj-button href="{{ActionUrl}}">Click Here</mj-button>
</mj-column>
</mj-section>
Compiles to ~200 lines of table-based HTML with inline styles that works everywhere.
Installation
Add Mjml.Net
dotnet add package Mjml.Net
Embed Templates as Resources
In your .csproj:
Sponsors
Details
- Repository
- github.com/aaronontheweb/dotnet-skills
- Categories
- Frontend Development, DevOps & CI/CD, Office & Documents, .NET & C#
- First seen
- Jun 3, 2026
More from aaronontheweb/dotnet-skills
All 34- Aspire Service Defaults497
- Aspire Configuration487
- Snapshot Testing484
- Dotnet Devcert Trust457
- Skills Index Snippets456
- Playwright Ci Caching455
- Akka Net Best Practices451
- Mailpit Integration443
- Verify Email Snapshots436
- Akka Hosting Actor Patterns434
- Akka Net Testing Patterns431
- OpenTelemetry NET Instrumentation431
- Akka Net Management430
- Akka Net Aspire Configuration415
- Marketplace Publishing408
- Modern Csharp Coding Standards2.3K
- Csharp Concurrency Patterns1.6K
- Efcore Patterns1.6K
- Dependency Injection Patterns703
- Database Performance700
- Dotnet Project Structure692
- Api Design690
- Type Design Performance684
- Ilspy Decompile640