Skip to content
aaronontheweb avatar

Mailpit Integration

Local email testing with Mailpit in .NET Aspire that captures outgoing mail without delivering it.

CCM score
65 of 100
skills.sh installs
465
GitHub stars
1.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers Aspire AppHost setup, SMTP configuration, a MailKit-based sender, and integration tests that assert on captured messages
  • Includes an SMTP settings class, a MailpitClient wrapper for its REST API, and a test fixture that starts the AppHost
  • Provides a web UI on port 8025 to inspect rendered HTML, raw source, headers, and attachments
  • Designed for .NET developers who want verified email delivery in integration tests without sending real mail

Install

$ npx -y skills add aaronontheweb/dotnet-skills --skill mailpit-integration -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Email Testing with Mailpit and .NET Aspire

When to Use This Skill

Use this skill when:

  • Testing email delivery locally without sending real emails
  • Setting up email infrastructure in .NET Aspire
  • Writing integration tests that verify emails are sent
  • Debugging email rendering and headers

Related skills:

  • aspnetcore/mjml-email-templates - MJML template authoring
  • testing/verify-email-snapshots - Snapshot test rendered HTML
  • aspire/integration-testing - General Aspire testing patterns

What is Mailpit?

Mailpit is a lightweight email testing tool that:

  • Captures all SMTP traffic without delivering emails
  • Provides a web UI to view captured emails
  • Exposes an API for programmatic access
  • Supports HTML rendering, headers, and attachments

Perfect for development and integration testing.


Aspire AppHost Configuration

Add Mailpit as a container in your AppHost:

// AppHost/Program.cs
var builder = DistributedApplication.CreateBuilder(args);

Details

Repository
github.com/aaronontheweb/dotnet-skills
Categories
.NET & C#, Testing & QA
First seen
Jun 3, 2026

Questions

What does the mailpit-integration skill do?

It helps you test email sending locally with Mailpit inside a .NET Aspire app, capturing outgoing emails without delivering them. It lets you view rendered HTML and headers and verify delivery in integration tests.

How do I install the mailpit-integration skill?

Run npx -y skills add aaronontheweb/dotnet-skills --skill mailpit-integration -y in your project. Once installed, the agent can set up Mailpit as a container in your Aspire AppHost and wire up SMTP settings.

What does the mailpit-integration skill need to run?

It needs .NET Aspire for the AppHost setup and the Mailpit container image. The SMTP sender example also uses the MailKit package, which you add with dotnet add package MailKit.

Where does mailpit-integration stand in the .NET & C# category?

It sits in the .NET & C# category on Claude Marketplaces, alongside dotnet-backend-patterns, dotnet-best-practices and nuget-manager. It covers the narrower job of local email testing with Mailpit and Aspire integration tests.

More from aaronontheweb/dotnet-skills

All 34

Similar to Mailpit Integration

More .NET & C#