An Aspire component leveraging the MailPit container.
Total Downloads
562.2K
562,174
Published
Oct 26, 2026
11d ago
Get Started
dotnet add package CommunityToolkit.Aspire.Hosting.MailPit --version 13.6.1
| 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();
Downloads by Version
Similar & Alternative Packages
Hand-picked matching NuGet libraries based on tags & ecosystem
Depended On By
Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
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.