aaronontheweb avatar

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-code

Installs 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 Mailpit
  • testing/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
1laravel avatarstarter-kit-upgradelaravel/agent-skillsSelectively pull upstream improvements from a Laravel starter kit (laravel/vue-starter-kit, laravel/react-starter-kit, laravel/svelte-starter-kit, laravel/livew512skills.sh installs
2horuz-ai avatarwebsite-clonerhoruz-ai/claude-pluginsAgentic workflow for cloning websites with pixel-perfect fidelity using specialized sub-agents. Use when the user wants to clone/copy/replicate a website, creat509skills.sh installs
3inertia-rails avatarinertia-rails-pagesinertia-rails/skillsPage components, persistent layouts, Link/router navigation, Head, Deferred, WhenVisible, InfiniteScroll, and URL-driven state for Inertia Rails. React examples509skills.sh installs
4secondsky avatarbetter-authsecondsky/claude-skillsSkill for integrating Better Auth - comprehensive TypeScript authentication framework for Cloudflare D1, Next.js, Nuxt, and 15+ frameworks. Use when adding auth502skills.sh installs
5martinholovsky avatartailwindcssmartinholovsky/claude-skills-generatorTailwind CSS utility-first styling for JARVIS UI components499skills.sh installs
6aj-geddes avatarux-designeraj-geddes/claude-code-bmad-skillsDesigns user experiences, creates wireframes, defines user flows, ensures accessibility. Trigger keywords - UX design, wireframe, user flow, accessibility, WCAG493skills.sh installs