Rask.Mail
0.20.1-alpha.0.243
See the version list below for details.
dotnet add package Rask.Mail --version 0.20.1-alpha.0.243
NuGet\Install-Package Rask.Mail -Version 0.20.1-alpha.0.243
<PackageReference Include="Rask.Mail" Version="0.20.1-alpha.0.243" />
<PackageVersion Include="Rask.Mail" Version="0.20.1-alpha.0.243" />
<PackageReference Include="Rask.Mail" />
paket add Rask.Mail --version 0.20.1-alpha.0.243
#r "nuget: Rask.Mail, 0.20.1-alpha.0.243"
#:package Rask.Mail@0.20.1-alpha.0.243
#addin nuget:?package=Rask.Mail&version=0.20.1-alpha.0.243&prerelease
#tool nuget:?package=Rask.Mail&version=0.20.1-alpha.0.243&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
PickupDirectoryat a folder to write.emlfiles instead. Production sends over SMTP via MailKit.
Use
public sealed 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>(o =>
{
o.From = "hello@example.com";
o.Smtp = new SmtpOptions { Host = "smtp.example.com", Port = 587, User = "…", Password = "…" };
});
builder.Services.AddDbContextFactory<AppDbContext>(o => o.UseSqlite("Data Source=app.db"));
// AppDbContext.OnModelCreating: modelBuilder.AddRaskMail();
// then: rask db add AddMail && rask db update
// send from anywhere IMail is injected:
await mail.SendAsync(Email
.To(user.Email, user.Name)
.Subject("Welcome")
.Body(WelcomeEmail(Name: user.Name))); // the generated factory, 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. |
-
net10.0
- MailKit (>= 4.17.0)
- Microsoft.EntityFrameworkCore (>= 10.0.11)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.11)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Rask.Mail:
| Package | Downloads |
|---|---|
|
Rask.Server
The ASP.NET host for Rask, a full-stack .NET web framework, with every battery: database (SQLite, PostgreSQL or SQL Server, picked by Rask:Database:Provider), mediator and query cache, accounts, background jobs, transactional email, cache, file storage, outbox, operator dashboard, durable logs, Web Push, SQLite snapshots and continuous backup. Renders Rask components with live updates over a WebSocket. RaskApp.Create(args).Run<App>() is the whole Program.cs; app.Configure(c => c.Jobs.Off()) is how an app does without one. Depends on Rask, the shared core. |
|
|
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.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.23.1-alpha.0.84 | 49 | 9/25/2026 |
| 0.23.1-alpha.0.82 | 36 | 9/25/2026 |
| 0.23.1-alpha.0.81 | 40 | 9/25/2026 |
| 0.23.1-alpha.0.80 | 35 | 9/25/2026 |
| 0.23.1-alpha.0.79 | 52 | 9/25/2026 |
| 0.23.1-alpha.0.78 | 36 | 9/25/2026 |
| 0.23.1-alpha.0.76 | 45 | 9/25/2026 |
| 0.23.1-alpha.0.74 | 36 | 9/25/2026 |
| 0.23.1-alpha.0.72 | 42 | 9/25/2026 |
| 0.23.1-alpha.0.70 | 40 | 9/25/2026 |
| 0.23.1-alpha.0.69 | 41 | 9/25/2026 |
| 0.23.1-alpha.0.68 | 54 | 9/25/2026 |
| 0.23.1-alpha.0.67 | 51 | 9/25/2026 |
| 0.23.1-alpha.0.66 | 40 | 9/24/2026 |
| 0.23.1-alpha.0.65 | 37 | 9/24/2026 |
| 0.23.1-alpha.0.64 | 43 | 9/24/2026 |
| 0.23.1-alpha.0.62 | 51 | 9/24/2026 |
| 0.23.1-alpha.0.61 | 46 | 9/24/2026 |
| 0.23.0 | 183 | 9/18/2026 |
| 0.20.1-alpha.0.243 | 83 | 9/7/2026 |