Rask.Mail
0.22.1-alpha.0.7
See the version list below for details.
dotnet add package Rask.Mail --version 0.22.1-alpha.0.7
NuGet\Install-Package Rask.Mail -Version 0.22.1-alpha.0.7
<PackageReference Include="Rask.Mail" Version="0.22.1-alpha.0.7" />
<PackageVersion Include="Rask.Mail" Version="0.22.1-alpha.0.7" />
<PackageReference Include="Rask.Mail" />
paket add Rask.Mail --version 0.22.1-alpha.0.7
#r "nuget: Rask.Mail, 0.22.1-alpha.0.7"
#:package Rask.Mail@0.22.1-alpha.0.7
#addin nuget:?package=Rask.Mail&version=0.22.1-alpha.0.7&prerelease
#tool nuget:?package=Rask.Mail&version=0.22.1-alpha.0.7&prerelease
Rask.Mail
Durable transactional email for a Rask app — queued on the app's own database and delivered off the request thread, with no broker or Redis.
- Compose with a fluent
Emailbuilder; the body is a Rask component rendered to HTML, so an email template is just another component. - Call
IMail.SendAsync(email)and it persists oneQueuedMailrow; a backgroundMailProcessordelivers it over SMTP — at-least-once, with exponential-backoff retries up toMaxAttempts(then left as a dead letter for inspection). - Delayed send with
ScheduleAsync(email, delay). - Zero-config in development — with no SMTP configured, mail is logged; point
Rask:Mail:PickupDirectoryat a folder to write.emlfiles instead. Production sends over SMTP via MailKit.
Use
public sealed partial class WelcomeEmail : Component
{
public string Name { get; set; } = "";
protected override Component? Render() =>
Div[H1[$"Welcome, {Name}!"], P["Thanks for signing up."]];
}
// Program.cs
builder.Services.AddRaskMail<AppDbContext>(); // reads Rask:Mail
builder.Services.AddDbContextFactory<AppDbContext>(o => o.UseSqlite("Data Source=app.db"));
// AppDbContext.OnModelCreating: modelBuilder.AddRaskMail();
// then: rask db add AddMail && rask db update
// appsettings.json — the SMTP password goes in the environment: Rask__Mail__Smtp__Password
{
"Rask": {
"Mail": {
"From": "hello@example.com",
"Smtp": { "Host": "smtp.example.com", "Port": 587, "User": "…" }
}
}
}
Any Rask:Mail:Smtp key turns SMTP delivery on. A callback — AddRaskMail<AppDbContext>(o => …) — runs
after the section and wins.
// send from anywhere IMail is injected — a component, or any class marked [RaskMarkup], where the chain lives:
await mail.SendAsync(Email
.To(user.Email, user.Name)
.Subject("Welcome")
.Body(WelcomeEmail.Name(user.Name))); // the chain, not new (RASK014)
await mail.ScheduleAsync(reminder, delay: TimeSpan.FromHours(24));
Register your context as an IDbContextFactory<AppDbContext>. Several instances is safe: each processor
leases the work it claims. On SQLite you will still usually run one, because SQLite is
single-writer, so the processor claims work by polling and writing. Use
UseRaskSqlite (WAL + a busy_timeout) so a concurrent send
waits for the write lock instead of failing.
Part of Rask — the .NET One Person Framework.
| 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. net11.0 is compatible. |
-
net10.0
- MailKit (>= 4.17.0)
- Microsoft.EntityFrameworkCore (>= 10.0.12)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.12)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Options (>= 10.0.12)
-
net11.0
- MailKit (>= 4.17.0)
- Microsoft.EntityFrameworkCore (>= 10.0.12)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.12)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Rask.Mail:
| Package | Downloads |
|---|---|
|
Rask.Dashboard
A built-in operator dashboard for the Rask One Person Framework batteries. Mounts at /_rask and shows the outbox, background jobs, queued mail, cache and stored files from the application's own database — queue depth, dead letters, the errors behind them, stored email previews, the recurring-job schedule, SQLite pragmas and backup status. A live log tail is built in, and becomes a searchable history when Rask.Logging is installed. Panels appear only for the batteries the app actually registered. Protected by an authorization policy that fails closed outside Development. |
|
|
Rask
The one reference a Rask application needs, server or browser. On a server target (net10.0 or net11.0) it brings the ASP.NET host plus every battery — database (SQLite, PostgreSQL or SQL Server, picked by Rask:Database:Provider), mediator, background jobs, transactional email, cache, file storage, outbox, operator dashboard, durable logs, Web Push, and SQLite snapshots and continuous backup — with RaskApp.Create(args) as the entry point. On a browser target it brings the WebAssembly host, the source-generated mediator, the query cache and remote dispatch. Everything referenced is wired and on; app.Configure(c => c.Jobs.Off()) is how an app does without one. Reference Rask.Server for a lean host with no database. |
|
|
Rask.Auth
Register, sign in and sign out for a Rask app, on by default. Accounts are the app's own User aggregate (PBKDF2 or bcrypt password hashing, passkeys beside the password, one revocable session row per signed-in device, sign-in throttling) and are exposed through Rask's own host-neutral surface — the same IUserProvider, Authorize component and [Authorize] routes work unchanged on the Server, WebAssembly, island, SPA and meta-framework hosts. rask new writes the /login, /register, /logout and /devices pages into the app, and the matching /api/auth endpoints give a TypeScript front end the same flows. Email confirmation and password reset go out through the app's own mail queue, with /confirm-email, /forgot-password and /reset-password pages scaffolded to match. The first account to register becomes the admin. |
|
|
Rask.Auth.Api
Register, sign in and sign out as JSON endpoints, for an ASP.NET Core app that renders no Rask components — a TypeScript SPA host or a meta-framework host, where the front end owns the UI. Accounts are the app's own User aggregate (PBKDF2 or bcrypt password hashing, passkeys, one revocable session row per device, sign-in throttling) and are exposed at /api/auth, with email confirmation and password reset through the app's own mail queue and optional bearer tokens. The first account to register becomes the admin. This is the host-neutral half of Rask.Auth: no components, no renderer, no Rask.Core. Add Rask.Auth instead when the app IS a Rask app and wants the built-in sign-in pages. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.22.1-alpha.0.15 | 0 | 9/16/2026 |
| 0.22.1-alpha.0.14 | 0 | 9/16/2026 |
| 0.22.1-alpha.0.13 | 0 | 9/16/2026 |
| 0.22.1-alpha.0.12 | 0 | 9/16/2026 |
| 0.22.1-alpha.0.9 | 0 | 9/16/2026 |
| 0.22.1-alpha.0.8 | 0 | 9/16/2026 |
| 0.22.1-alpha.0.7 | 0 | 9/16/2026 |
| 0.22.1-alpha.0.6 | 0 | 9/16/2026 |
| 0.22.1-alpha.0.4 | 0 | 9/16/2026 |
| 0.22.1-alpha.0.3 | 0 | 9/16/2026 |
| 0.22.1-alpha.0.2 | 0 | 9/16/2026 |
| 0.22.1-alpha.0.1 | 0 | 9/16/2026 |
| 0.22.0 | 0 | 9/16/2026 |
| 0.21.1-alpha.0.88 | 0 | 9/16/2026 |
| 0.21.1-alpha.0.87 | 23 | 9/15/2026 |
| 0.21.1-alpha.0.83 | 36 | 9/15/2026 |
| 0.21.1-alpha.0.81 | 36 | 9/15/2026 |
| 0.21.1-alpha.0.80 | 31 | 9/15/2026 |
| 0.21.1-alpha.0.79 | 37 | 9/15/2026 |
| 0.21.1-alpha.0.78 | 32 | 9/15/2026 |