AspNetMailbox 0.1.0
dotnet add package AspNetMailbox --version 0.1.0
NuGet\Install-Package AspNetMailbox -Version 0.1.0
<PackageReference Include="AspNetMailbox" Version="0.1.0" />
<PackageVersion Include="AspNetMailbox" Version="0.1.0" />
<PackageReference Include="AspNetMailbox" />
paket add AspNetMailbox --version 0.1.0
#r "nuget: AspNetMailbox, 0.1.0"
#:package AspNetMailbox@0.1.0
#addin nuget:?package=AspNetMailbox&version=0.1.0
#tool nuget:?package=AspNetMailbox&version=0.1.0
AspNetMailbox
Captures outbound email in-process during development and previews it at /_mailbox. No separate mail server, no Docker. Part of the AspNetDebugDashboard suite.

Install
dotnet add package AspNetMailbox
Setup
using AspNetMailbox;
builder.Services.AddMailbox(); // 1. register + start the SMTP sink
var app = builder.Build();
app.UseMailbox(); // 2. serve /_mailbox (no-op outside Development)
Point your existing email code at the sink in Development and open /_mailbox.
Capturing mail
SMTP sink (default). A tiny in-process SMTP server listens on port 2525. Send to localhost:2525 from any library (MailKit, System.Net.Mail, anything) and it's captured. This is the Mailpit/smtp4dev model without the separate process.
using var smtp = new SmtpClient("localhost", 2525);
smtp.Send(message);
Explicit. For senders that don't use SMTP, hand messages over directly:
public class Notifier(IMailbox mailbox)
{
public void Send(MimeMessage message) => mailbox.Capture(message);
}
What you get
/_mailbox lists captured mail. Open one for tabs: rendered Preview (sandboxed, captured HTML can't run scripts in your dashboard) with a light/dark background toggle, HTML, Text, Headers, Raw source, and Attachments (downloadable). Search by subject or sender, or download the whole message as a .eml file.
Configuration
builder.Services.AddMailbox(o =>
{
o.BasePath = "/_mailbox"; // dashboard route
o.SmtpPort = 2525; // sink port
o.EnableSmtpSink = true; // turn the sink off if you only capture explicitly
o.MaxMessages = 200; // oldest trimmed past this
o.DatabasePath = "mailbox.db"; // local LiteDB store
});
License
MIT.
| Product | Versions 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 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
- AspNetDebugDashboard.Suite (>= 1.0.0)
- LiteDB (>= 5.0.21)
- MimeKit (>= 4.17.0)
- SmtpServer (>= 11.1.0)
-
net8.0
- AspNetDebugDashboard.Suite (>= 1.0.0)
- LiteDB (>= 5.0.21)
- MimeKit (>= 4.17.0)
- SmtpServer (>= 11.1.0)
-
net9.0
- AspNetDebugDashboard.Suite (>= 1.0.0)
- LiteDB (>= 5.0.21)
- MimeKit (>= 4.17.0)
- SmtpServer (>= 11.1.0)
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 |
|---|---|---|
| 0.1.0 | 49 | 6/17/2026 |