mailpit-integration
This skill integrates Mailpit, a lightweight email testing tool, into .NET Aspire projects for seamless local development workflows. It handles containerized SMTP server setup and web UI configuration, enabling developers to capture and inspect emails without external services. Perfect for testing email functionality across .NET applications during development cycles.
mailpit-integration enables you to set up a containerized Mailpit SMTP server within .NET Aspire, capturing all outbound emails during local development. Configure your ASP.NET Core application to route emails to the Mailpit container via SMTP settings, then access the Mailpit web UI to inspect rendered emails, headers, and content without sending real messages. This approach integrates seamlessly into your Aspire orchestration, allowing you to test email functionality alongside other services in a unified local environment.
AI-generated summary based on this skill's SKILL.md
Install
Aaronontheweb/dotnet-skills/aspire-mailpit-integration · repository language: Shell
git clone https://github.com/Aaronontheweb/dotnet-skills
cp -r dotnet-skills/skills/aspire-mailpit-integration ~/.claude/skills/aspire-mailpit-integrationFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How to test emails locally with mailpit in a .NET Aspire project?
mailpit-integration enables you to set up a containerized Mailpit SMTP server within .NET Aspire, capturing all outbound emails during local development. Configure your ASP.NET Core application to route emails to the Mailpit container via SMTP settings, then access the Mailpit web UI to inspect rendered emails, headers, and content without sending real messages. This approach integrates seamlessly into your Aspire orchestration, allowing you to test email functionality alongside other services in a unified local environment.
What is mailpit-integration and how does it support email testing?
mailpit-integration is an MIT-licensed skill that integrates Mailpit, a lightweight email testing tool, into .NET Aspire projects for seamless local development workflows. It handles containerized SMTP server setup and web UI configuration, enabling developers to capture and inspect emails without external services. The skill is perfect for testing email functionality across .NET applications during development cycles, providing both UI-based inspection and programmatic API access to verify email delivery and content.
Can mailpit-integration help write integration tests that verify emails are sent and contain expected content?
Yes, mailpit-integration supports writing integration tests by providing access to the Mailpit API, allowing you to programmatically assert on captured messages. You can verify that emails were sent, inspect their content, headers, and rendering, and validate that expected information appears in the message body. This enables comprehensive email delivery testing within your ASP.NET Core test suite, ensuring your email sender service behaves correctly without relying on external email providers during test execution.
How does mailpit-integration handle SMTP configuration in ASP.NET Core?
mailpit-integration guides you through configuring SMTP settings in your ASP.NET Core application to connect to the Mailpit container running in .NET Aspire. You configure your email sender service to use Mailpit's SMTP endpoint (typically localhost:1025 in development), allowing all outbound emails to be intercepted and stored locally. This configuration keeps your development environment isolated and prevents accidental emails from being sent to real addresses during testing and debugging.
What can you do with the Mailpit web UI for email debugging?
mailpit-integration provides access to the Mailpit web UI, where you can debug email rendering, inspect headers, and review delivery details without sending real emails. The UI displays all captured messages with full rendering previews, allowing you to verify that your email templates display correctly across different formats. You can examine SMTP logs, view raw message content, and inspect email metadata—making it ideal for troubleshooting email functionality during local development before deploying to production.
How do you access the Mailpit API programmatically with mailpit-integration?
mailpit-integration enables you to access the Mailpit API programmatically from your .NET code, allowing you to query captured messages, assert on email content, and automate email verification in integration tests. You can retrieve message details, inspect attachments, and validate that specific emails were sent with expected content. This API-driven approach complements the web UI, giving you both manual inspection capabilities and automated testing support for comprehensive email validation in your ASP.NET Core applications.
SKILL.md
rendered from the published skill — quoted content, verbatim
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
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 1 file
skills/aspire-mailpit-integration/SKILL.md