Naravel.Mail.Smtp 0.2.0

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

Naravel.Mail.Smtp

NuGet Downloads .NET 10 License: MIT

Optional SMTP transport for Naravel.Mail, built on MailKit.

Fact Detail
Install dotnet add package Naravel.Mail.Smtp
Targets .NET 10
Needs Naravel.Mail, which NuGet installs with it
Driver smtp, added with AddNaravelMailSmtp
Security StartTls (the default, port 587), SslOnConnect (port 465) or None (clear text, for local test servers only)

What you get

  • TLS unless you say otherwise. Security defaults to StartTls, and clear text needs an explicit "Security": "None".
  • Authentication only when asked. Without a Username no authentication is attempted.
  • A connection per send. Each send connects, authenticates, sends and disconnects, so concurrent sends are safe.
  • Safe headers. Bcc recipients are used for delivery only and never appear in headers, and a subject with line breaks cannot inject a header.
  • A bad setting fails with its name. The first send reports which key is wrong, and the application still starts.

Quick start

builder.Services.AddNaravelMail(builder.Configuration);
builder.Services.AddNaravelMailSmtp(builder.Configuration);   // after AddNaravelMail
{
  "Mail": {
    "Default": "relay",
    "From": "app@example.com",
    "Mailers": {
      "relay": { "Driver": "smtp", "Host": "smtp.example.com", "Port": 587, "Security": "StartTls", "Username": "app", "Timeout": 30 }
    }
  }
}

Timeout is in seconds. Keep the password out of the file: set it in user secrets or as Mail__Mailers__relay__Password. A server rejection or a network failure reaches the caller as the MailKit exception, and nothing is retried inside the transport.

Package Adds
Naravel.Mail Mailables, named transports and the fake that this transport delivers for
Naravel.Mail.Queue Queues the message, and a worker sends it through the transport you named

Learn more

Part of Naravel: Laravel's names, .NET's type system. All Naravel packages share one version.

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
0.2.0 257 11/13/2026
0.1.1 104 11/2/2026
0.1.0 106 11/1/2026