WeChooz.Aspire.Hosting.MailDev 2.0.2

Prefix Reserved
dotnet add package WeChooz.Aspire.Hosting.MailDev --version 2.0.2
                    
NuGet\Install-Package WeChooz.Aspire.Hosting.MailDev -Version 2.0.2
                    
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="WeChooz.Aspire.Hosting.MailDev" Version="2.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WeChooz.Aspire.Hosting.MailDev" Version="2.0.2" />
                    
Directory.Packages.props
<PackageReference Include="WeChooz.Aspire.Hosting.MailDev" />
                    
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 WeChooz.Aspire.Hosting.MailDev --version 2.0.2
                    
#r "nuget: WeChooz.Aspire.Hosting.MailDev, 2.0.2"
                    
#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 WeChooz.Aspire.Hosting.MailDev@2.0.2
                    
#: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=WeChooz.Aspire.Hosting.MailDev&version=2.0.2
                    
Install as a Cake Addin
#tool nuget:?package=WeChooz.Aspire.Hosting.MailDev&version=2.0.2
                    
Install as a Cake Tool

WeChooz Aspire Hosting MailDev

CI

This .NET Aspire Integration runs MailDev in a container.

Get started

To get started, install the install the 📦 WeChooz.Aspire.Hosting.MailDev NuGet package in the AppHost project.

.NET CLI

dotnet add package WeChooz.Aspire.Hosting.MailDev

Usage

To add the MailDev resource, call the AddMailDev method on a IDistributedApplicationBuilder instance representing the .NET Aspire host:

builder.AddMailDev("mailer");

The 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.

More options

You can specify the port for the SMTP and HTTP endpoint:

builder.AddMailDev("mailer", httpPort: 1234, smtpPort: 4321);

You can also specify a username and a password to secure the connection to the SMTP (local) server (learn how to work with parameter in .NET Aspire):

builder.AddMailDev("mailer", credentials: new CredentialsResourceParameterBuilder(builder.AddParameter(...), builder.AddParameter(...));

When credentials are specified, the format of the connection string becomes: Endpoint=smtp://<host>:<port>;Username=<username>;Password=<password>

Lovingly inspired by .NET Aspire documentation

This project is lovingly inspired by the integration samples in the .NET Aspire documentation.

It has been improved to meet our internal needs.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.2 260 8/8/2026
2.0.1 346 7/19/2026
2.0.0 3,957 4/2/2026
1.0.2 8,679 8/9/2025
1.0.1 204 8/9/2025
1.0.0 206 8/9/2025