net10.0net8.0net9.0
An Aspire component leveraging the MailPit container.
Published
Oct 11, 2026
8d ago
Total Downloads
408.1K
408,091
Install
dotnet add package CommunityToolkit.Aspire.Hosting.MailPit --version 13.6.1-beta.930
| Product | Versions |
|---|---|
| .NET |
README
CommunityToolkit.Hosting.MailPit
Overview
This Aspire Integration runs MailPit in a container.
Usage
The MailPit integration exposes a connection string with the format endpoint=smtp://<host>:<port>.
This connection string can be used to with a DbConnectionStringBuilder to get the smtp endpoint.
Example 1: Add MailPit with generated ports
var builder = DistributedApplication.CreateBuilder(args);
var mailpit = builder.AddMailPit("mailpit");
var xyz = builder.AddProject<Xyz>("application")
.WithReference(mailpit)
.WaitFor(mailpit);
builder.Build().Run();
Example 2: Add MailPit with user-defined ports
var builder = DistributedApplication.CreateBuilder(args);
var mailpit = builder.AddMailPit("mailpit", 80, 25);
var xyz = builder.AddProject<Xyz>("application")
.WithReference(mailpit)
.WaitFor(mailpit);
builder.Build().Run();
Changes from Previous Version
No structural changes between v13.6.0 and v13.6.1-beta.930.
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.