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
<PackageReference Include="WeChooz.Aspire.Hosting.MailDev" Version="2.0.2" />
<PackageVersion Include="WeChooz.Aspire.Hosting.MailDev" Version="2.0.2" />
<PackageReference Include="WeChooz.Aspire.Hosting.MailDev" />
paket add WeChooz.Aspire.Hosting.MailDev --version 2.0.2
#r "nuget: WeChooz.Aspire.Hosting.MailDev, 2.0.2"
#:package WeChooz.Aspire.Hosting.MailDev@2.0.2
#addin nuget:?package=WeChooz.Aspire.Hosting.MailDev&version=2.0.2
#tool nuget:?package=WeChooz.Aspire.Hosting.MailDev&version=2.0.2
WeChooz Aspire Hosting MailDev
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 | Versions 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. |
-
net10.0
- Aspire.Hosting (>= 13.4.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.