mailpit-integration

Integrate Mailpit into .NET Aspire apps for local email testing.

71|10|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/wshaddix/dotnet-skills --skill mailpit-integration-wshaddix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mailpit-integration
Source: https://github.com/wshaddix/dotnet-skills/tree/main/skills/aspire-mailpit-integration
Command: npx skills add https://github.com/wshaddix/dotnet-skills --skill mailpit-integration-wshaddix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires MailKit, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill allows developers to test email sending functionality locally within a .NET Aspire application without sending actual emails, streamlining integration testing and debugging.

Core Features & Use Cases

  • Local Email Capture: Intercepts all outgoing emails, preventing them from being sent externally.
  • Email Inspection: Provides a web UI and API to view captured emails, inspect HTML, headers, and attachments.
  • Aspire Integration: Seamlessly integrates Mailpit as a container resource within a .NET Aspire application host.
  • Use Case: When developing a user registration feature, use this Skill to ensure the welcome email is generated correctly and contains the right content, all without spamming your test email inboxes.

Quick Start

Configure your .NET Aspire AppHost to include Mailpit and set up your application's SMTP settings to point to the Mailpit container.

Frequently Asked Questions about mailpit-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test email sending in a .NET Aspire application without delivering actual messages?

To test email sending locally without external delivery, you can integrate a local email capture service. This Skill configures Mailpit as a container resource in your .NET Aspire AppHost to intercept and store outgoing emails for inspection.

How can I inspect outgoing emails during local integration testing?

You can inspect outgoing emails during integration testing by routing SMTP traffic to a local capture tool. This integration provides a web UI and API to view captured HTML, headers, and attachments within your development environment.

What dependencies are required to integrate Mailpit for email testing in .NET?

Integrating Mailpit for .NET email testing requires configuring the AppHost and using MailKit. MailKit serves as the email sender implementation that routes outgoing SMTP traffic to the Mailpit container for local capture.

Does this local email testing approach support viewing HTML content and attachments?

Yes, local email testing with this setup supports viewing HTML content and attachments. The integrated capture tool provides a web interface that allows developers to thoroughly inspect intercepted emails during development.

What is the best way to prevent spamming real email inboxes during .NET integration testing?

The best way to prevent spamming real inboxes during .NET integration testing is to intercept outgoing mail locally. This Skill uses Mailpit to capture emails within a .NET Aspire container, ensuring messages are never sent externally.