OutWit.Shared.Email.Provider.Smtp 1.0.1

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

OutWit.Shared.Email.Provider.Smtp

SMTP email transport plugin for OutWit hosts. Implements IEmailTransport over MailKit — covers on-prem relays, corporate Exchange, hosted SMTP services (SendGrid SMTP, Amazon SES SMTP, Mailgun SMTP), and local dev catchers like MailHog and Papercut-SMTP.

Configuration

Plugin reads its own appsettings.json from inside the deployed module folder:

{
  "Smtp": {
    "Host": "",
    "Port": 587,
    "Username": "",
    "Password": "",
    "Security": "StartTls",
    "Timeout": "00:00:30",
    "AllowSelfSignedCertificates": false
  }
}
Setting Default Description
Host (required) SMTP server host name.
Port 587 TCP port. Typical values: 25 (relay/no-TLS), 465 (SslOnConnect), 587 (StartTls).
Username (empty) Auth username. Leave blank for unauthenticated relays (LAN, dev SMTP catchers).
Password (empty) Auth password. Should be supplied via env var Smtp__Password — keep the JSON value blank.
Security StartTls TLS mode: None, StartTls, SslOnConnect, Auto.
Timeout 00:00:30 Connection / send timeout (hh:mm:ss).
AllowSelfSignedCertificates false Accept untrusted server certs. Dev only — MailHog/Papercut use self-signed certs. Never in production.

Env-var override convention

Standard .NET configuration binding maps double-underscore env vars to JSON keys:

Smtp__Host=smtp.example.com
Smtp__Port=587
Smtp__Username=postmaster@example.com
Smtp__Password=********           # never put this in JSON
Smtp__Security=StartTls

Installation

dotnet add package OutWit.Shared.Email.Provider.Smtp

The plugin's build/.targets auto-copies the module to your output @Email/smtp.module/ at build time. The host's WitPluginLoader<IEmailProviderPlugin>(Path.Combine(AppContext.BaseDirectory, "@Email")) discovers it.

Failure classification

MailKit exceptions are mapped to neutral EmailFailureKind values so the host's failure tracker / retry policy works the same regardless of provider:

Exception / SMTP code Kind
AuthenticationException, SMTP 535 AuthFailure
SMTP 421, 450, 451, 452 Transient (caller may retry)
SMTP 550, 551, 553 InvalidRecipient (don't retry, mark recipient bad)
SMTP 552 (message too large) Permanent
IOException / SocketException / TimeoutException Transient
Any other 5xx, generic exceptions Permanent

Testing locally with MailHog

docker run -d -p 1025:1025 -p 8025:8025 --name mailhog mailhog/mailhog

Plugin config (or env):

Smtp__Host=localhost
Smtp__Port=1025
Smtp__Security=None

UI at http://localhost:8025 shows captured messages.

License

Apache 2.0 — see LICENSE.txt.

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.

This package has no dependencies.

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
1.0.1 314 8/9/2026
1.0.0 389 5/13/2026