Naravel.Mail.Queue 0.2.0

dotnet add package Naravel.Mail.Queue --version 0.2.0
                    
NuGet\Install-Package Naravel.Mail.Queue -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.Queue" 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.Queue" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Naravel.Mail.Queue" />
                    
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.Queue --version 0.2.0
                    
#r "nuget: Naravel.Mail.Queue, 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.Queue@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.Queue&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Naravel.Mail.Queue&version=0.2.0
                    
Install as a Cake Tool

Naravel.Mail.Queue

NuGet Downloads .NET 10 License: MIT

Optional Naravel.Mail adapter that delivers mail through Naravel.Queue: QueueAsync stores only the built message data.

Fact Detail
Install dotnet add package Naravel.Mail.Queue
Targets .NET 10
Needs Naravel.Mail and Naravel.Queue, which NuGet installs with it
Runs on a Naravel.Queue driver and a worker that you register

What you get

  • Queue instead of send. mailer.To(...).QueueAsync(mailable) builds the message now and leaves the sending to a worker.
  • Plain data in the queue. Only the addresses, the subject, the text and HTML bodies and the transport name are stored, never the mailable or a type name.
  • The transport is fixed when you queue. manager.Mailer("smtp").To(a).QueueAsync(...) stores smtp, and the worker uses it even if Mail:Default changes.
  • Placement in one place. options.Connection and options.Queue choose where the job goes; the defaults are the queue module's default connection and default.
  • Retries from the queue. A failed send is retried with the job's MaxAttempts and backoff.

Quick start

builder.Services.AddQueue(builder.Configuration).AddRedisDriver(builder.Configuration);   // AddRedisDriver comes from Naravel.Queue.Redis; any other queue driver package works the same
builder.Services.AddNaravelMail(builder.Configuration);
builder.Services.AddNaravelMailQueue();

await mailer.To(user.Email).QueueAsync(new WelcomeMail(user), ct);

WelcomeMail is your own Mailable, user is your own object and mailer is an injected IMailer. Delivery is at least once, so a worker that stops after the transport accepted the message can send it twice, and attachments are not part of the queued data yet. AddNaravelMailQueue registers neither a queue nor a worker: add AddQueueWorker in the process that should send. Without this package, QueueAsync throws an exception that says what to install.

Package Adds
Naravel.Mail Mailables, named transports and the fake that this adapter queues
Naravel.Mail.Smtp The SMTP transport that a worker can send through
Naravel.Queue Jobs, retries and the background worker that send the message

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 94 11/13/2026
0.1.1 102 11/2/2026
0.1.0 105 11/1/2026