CommunityToolkit.Aspire.Hosting.MailPit 9.6.0

Prefix Reserved
dotnet add package CommunityToolkit.Aspire.Hosting.MailPit --version 9.6.0
                    
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.MailPit -Version 9.6.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CommunityToolkit.Aspire.Hosting.MailPit" Version="9.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CommunityToolkit.Aspire.Hosting.MailPit" Version="9.6.0" />
                    
Directory.Packages.props
<PackageReference Include="CommunityToolkit.Aspire.Hosting.MailPit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CommunityToolkit.Aspire.Hosting.MailPit --version 9.6.0
                    
#r "nuget: CommunityToolkit.Aspire.Hosting.MailPit, 9.6.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CommunityToolkit.Aspire.Hosting.MailPit@9.6.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CommunityToolkit.Aspire.Hosting.MailPit&version=9.6.0
                    
Install as a Cake Addin
#tool nuget:?package=CommunityToolkit.Aspire.Hosting.MailPit&version=9.6.0
                    
Install as a Cake Tool

CommunityToolkit.Hosting.MailPit

Overview

This .NET 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();
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on CommunityToolkit.Aspire.Hosting.MailPit:

Repository Stars
foxminchan/BookWorm
The practical implementation of .NET Aspire using Microservices
Version Downloads Last Updated
9.6.0 345 7/10/2025
9.6.0-beta.324 103 7/10/2025
9.5.1-beta.323 104 7/10/2025
9.5.1-beta.322 105 7/10/2025
9.5.1-beta.321 104 7/10/2025
9.5.1-beta.320 110 7/9/2025
9.5.1-beta.319 106 7/8/2025
9.5.1-beta.318 116 7/2/2025
9.5.1-beta.317 111 6/30/2025
9.5.1-beta.315 116 6/26/2025
9.5.1-beta.314 116 6/23/2025
9.5.1-beta.313 102 6/20/2025
9.5.1-beta.312 103 6/20/2025
9.5.1-beta.311 109 6/18/2025
9.5.1-beta.310 119 6/17/2025
9.5.1-beta.309 111 6/17/2025
9.5.1-beta.308 111 6/17/2025
9.5.1-beta.307 117 6/16/2025
9.5.1-beta.306 274 6/11/2025
9.5.1-beta.305 95 6/7/2025
9.5.1-beta.304 105 6/6/2025
9.5.1-beta.303 110 6/4/2025
9.5.1-beta.302 119 6/4/2025
9.5.1-beta.301 118 6/2/2025
9.5.1-beta.300 136 5/28/2025
9.5.0 3,300 5/27/2025
9.5.0-beta.299 118 5/27/2025
9.5.0-beta.298 121 5/26/2025
9.5.0-beta.297 72 5/24/2025
9.5.0-beta.296 70 5/24/2025
9.5.0-beta.295 43 5/24/2025
9.4.1-beta.291 119 5/19/2025
9.4.1-beta.289 131 5/16/2025
9.4.1-beta.288 181 5/16/2025
9.4.1-beta.287 187 5/16/2025
9.4.1-beta.286 184 5/16/2025
9.4.1-beta.285 198 5/14/2025
9.4.1-beta.284 201 5/13/2025
9.4.1-beta.283 204 5/12/2025
9.4.1-beta.282 116 5/7/2025
9.4.1-beta.280 126 5/2/2025
9.4.1-beta.279 112 5/2/2025
9.4.1-beta.277 134 4/23/2025
9.4.1-beta.276 132 4/23/2025
9.4.1-beta.275 131 4/23/2025
9.4.1-beta.274 123 4/23/2025
9.4.1-beta.273 121 4/23/2025
9.4.1-beta.272 129 4/23/2025
9.4.1-beta.271 132 4/23/2025
9.4.1-beta.270 142 4/20/2025
9.4.0 1,441 4/20/2025
9.4.0-beta.269 128 4/20/2025
9.4.0-beta.268 133 4/20/2025
9.3.1-beta.267 125 4/20/2025
9.3.1-beta.266 52 4/19/2025
9.3.1-beta.265 156 4/15/2025
9.3.1-beta.264 156 4/15/2025
9.3.1-beta.263 161 4/15/2025
9.3.1-beta.262 167 4/15/2025
9.3.1-beta.260 133 4/10/2025
9.3.1-beta.259 136 4/8/2025
9.3.1-beta.258 129 4/8/2025
9.3.1-beta.257 129 4/8/2025
9.3.1-beta.256 128 4/8/2025
9.3.1-beta.255 138 4/8/2025
9.3.1-beta.254 134 4/8/2025
9.3.1-beta.253 144 4/1/2025
9.3.1-beta.252 107 3/27/2025
9.3.1-beta.250 111 3/27/2025
9.3.1-beta.249 110 3/27/2025
9.3.1-beta.248 107 3/27/2025
9.3.1-beta.247 111 3/27/2025
9.3.1-beta.244 457 3/25/2025
9.3.1-beta.242 457 3/24/2025
9.3.1-beta.241 125 3/19/2025
9.3.0 1,930 3/19/2025
9.3.0-beta.239 120 3/19/2025
9.2.2-beta.237 121 3/19/2025
9.2.2-beta.236 95 3/14/2025
9.2.2-beta.230 134 3/13/2025
9.2.2-beta.229 114 3/13/2025
9.2.2-beta.228 135 3/11/2025
9.2.2-beta.227 132 3/11/2025
9.2.2-beta.226 134 3/11/2025
9.2.2-beta.225 139 3/11/2025
9.2.2-beta.224 133 3/11/2025
9.2.2-beta.223 145 3/10/2025
9.2.2-beta.222 138 3/10/2025
9.2.2-beta.220 138 3/9/2025
9.2.2-beta.218 133 3/9/2025
9.2.2-beta.217 173 3/7/2025
9.2.2-beta.216 170 3/7/2025
9.2.2-beta.215 176 3/7/2025
9.2.2-beta.214 168 3/5/2025
9.2.2-beta.213 170 3/5/2025
9.2.2-beta.212 171 3/5/2025
9.2.2-beta.211 173 3/4/2025
9.2.2-beta.210 178 3/4/2025
9.2.2-beta.208 86 3/3/2025
9.2.1 965 3/3/2025
9.2.1-beta.207 96 3/2/2025
9.2.1-beta.206 69 3/1/2025
9.2.1-beta.205 75 2/27/2025
9.2.1-beta.204 62 2/26/2025
9.2.1-beta.203 68 2/26/2025
9.2.0 230 2/26/2025
9.2.0-beta.202 73 2/26/2025
9.2.0-beta.201 70 2/26/2025
9.2.0-beta.199 65 2/26/2025
9.2.0-beta.198 60 2/26/2025