mailpit-integration

Configure Mailpit in .NET Aspire to capture and inspect outgoing emails.

57|7|Updated Aug 6, 2025
One-click install
npx skills add https://github.com/seiggy/lucia-dotnet --skill mailpit-integration-seiggy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mailpit-integration
Source: https://github.com/seiggy/lucia-dotnet/tree/main/.github/skills/aspire-mailpit-integration
Command: npx skills add https://github.com/seiggy/lucia-dotnet --skill mailpit-integration-seiggy

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 without sending actual emails, streamlining the development and integration testing process.

Core Features & Use Cases

  • Local Email Capture: Intercepts all outgoing emails, preventing them from being sent to real recipients.
  • Email Inspection: Provides a web UI and API to view captured emails, inspect headers, and verify rendered HTML.
  • Use Case: When developing a user registration feature, use this Skill to ensure welcome emails are generated correctly and contain the right information, all without spamming your test accounts.

Quick Start

Configure your .NET Aspire application to include Mailpit and set up your SMTP client to use its local endpoint.

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 locally in a .NET Aspire application?

Test email sending locally in .NET Aspire by integrating Mailpit to intercept outgoing emails. This captures SMTP traffic during development, allowing you to inspect messages and verify rendered HTML without spamming real recipients.

How do I capture and inspect outgoing emails during integration testing?

Capture and inspect outgoing emails during integration testing by routing SMTP traffic to a local Mailpit instance. It provides a web UI and API to view intercepted messages, inspect headers, and verify HTML rendering safely.

Does Mailpit work with .NET Aspire and MailKit for SMTP testing?

Yes, Mailpit works with .NET Aspire and MailKit for SMTP testing. The integration deploys a containerized Mailpit instance via Aspire's AppHost and configures MailKit to send emails to its local endpoint for capture.

What's the best way to prevent real emails from sending during .NET development?

The best way to prevent real emails from sending during .NET development is using a local email capture tool like Mailpit. It intercepts all outgoing SMTP traffic, ensuring test messages are never delivered to actual recipient inboxes.

How do I configure SMTP settings for a containerized Mailpit instance in Aspire?

Configure SMTP settings for a containerized Mailpit instance in Aspire by adding Mailpit to your AppHost and pointing your email sender implementation to its local endpoint. This setup allows the client to capture outgoing messages.