[ CONVEX COMPONENT · STABLE · MIT ]
@vllnt/convex-email
Durable, transport-agnostic outbound transactional email queue — enqueue, retry, idempotent send, and per-message delivery status
STABLE 0.1.0 · 2 GitHub stars
Package details
Install
The untagged install gets the latest stable version (0.1.0). The canary tag tracks main (0.1.1-canary.51546d7).
pnpm add @vllnt/convex-email
pnpm add @vllnt/convex-email@canaryRegister the component
Add it to your app’s convex/convex.config.ts, then run npx convex dev to generate the references.
import { defineApp } from "convex/server";
import email from "@vllnt/convex-email/convex.config";
const app = defineApp();
app.use(email);
export default app;Use it
Usage, options and examples are in the package README.
Downloads
- Last 7 days
- 31
- Since first publish
- 2,621
Downloads per week since 14 June 2026, oldest on the left. Weeks count back from 23 November 2026, so the first one may be shorter than seven days.
31 downloads in the last 7 days. 2,621 downloads since 14 June 2026. Source: npm, counted through 23 November 2026.
Show downloads per week as a table
| Week | Downloads |
|---|---|
| 14 June 2026 to 15 June 2026 | 141 |
| 16 June 2026 to 22 June 2026 | 464 |
| 23 June 2026 to 29 June 2026 | 111 |
| 30 June 2026 to 6 July 2026 | 118 |
| 7 July 2026 to 13 July 2026 | 87 |
| 14 July 2026 to 20 July 2026 | 39 |
| 21 July 2026 to 27 July 2026 | 15 |
| 28 July 2026 to 3 August 2026 | 5 |
| 4 August 2026 to 10 August 2026 | 12 |
| 11 August 2026 to 17 August 2026 | 87 |
| 18 August 2026 to 24 August 2026 | 22 |
| 25 August 2026 to 31 August 2026 | 333 |
| 1 September 2026 to 7 September 2026 | 378 |
| 8 September 2026 to 14 September 2026 | 47 |
| 15 September 2026 to 21 September 2026 | 19 |
| 22 September 2026 to 28 September 2026 | 14 |
| 29 September 2026 to 5 October 2026 | 12 |
| 6 October 2026 to 12 October 2026 | 17 |
| 13 October 2026 to 19 October 2026 | 16 |
| 20 October 2026 to 26 October 2026 | 20 |
| 27 October 2026 to 2 November 2026 | 327 |
| 3 November 2026 to 9 November 2026 | 85 |
| 10 November 2026 to 16 November 2026 | 221 |
| 17 November 2026 to 23 November 2026 | 31 |
Release history
Every release on a timeline, oldest on the left. A tall mark with its version is a stable release; a short mark is a canary build. The time axis is the one of the downloads chart, so a release stands above the week it shipped in.
1 stable release and 11 canary builds since 14 June 2026. Latest stable: 0.1.0 on 1 September 2026.
Show every release as a table
| Version | Kind | Published |
|---|---|---|
| 0.1.1-canary.51546d7 | canary | 15 November 2026 |
| 0.1.1-canary.4d322a9 | canary | 31 October 2026 |
| 0.1.1-canary.d88db7c | canary | 31 October 2026 |
| 0.1.0 | stable | 1 September 2026 |
| 0.1.0-canary.904430f | canary | 1 September 2026 |
| 0.1.0-canary.38d9dc0 | canary | 31 August 2026 |
| 0.1.0-canary.995e47f | canary | 31 August 2026 |
| 0.1.0-canary.3ab60aa | canary | 31 August 2026 |
| 0.1.0-canary.0c81afa | canary | 16 June 2026 |
| 0.1.0-canary.ad66628 | canary | 16 June 2026 |
| 0.1.0-canary.e84a2a7 | canary | 16 June 2026 |
| 0.1.0-canary.63aca6b | canary | 14 June 2026 |
Changelog
The newest stable releases of @vllnt/convex-email, with the notes from its changelog.
0.1.0
Added
- First release of
@vllnt/convex-email— a durable, transport-agnostic outbound transactional email queue. - Provider-neutral: the transport is a host-configured, host-driven adapter
(
transportis an opaque string tag). The component records send intent and per-message status and never calls a mail provider. enqueue(messageId, to, from, transport, opts?)records a message inqueuedand returns its id immediately;messageIdis host-supplied and must be unique. AnidempotencyKeydedups a re-enqueue (deduplicated: true) so a retry never double-sends.markSending(messageId)claims aqueuedmessage for a send attempt (incrementsattempts);markSent(messageId, { providerId? })records a terminal success;markFailed(messageId, { error? })re-queues whileattempts < maxAttemptselse lands in terminalfailed.get(messageId)returns the current envelope (ornull);listByStatus(status, paginationOpts)pages messages in one status oldest-first via the standard Convex pagination envelope.- Terminal states are final: any transition out of
sent/failedis rejected withConvexError({ code: "TERMINAL_STATE" }), so a late or duplicate delivery callback can never overwrite a recorded outcome;markSentis idempotent. - Server-sourced time: every handler stamps
createdAt/updatedAtfromDate.now()inside the mutation — no caller-supplied clock. - Typed generics:
Email<TPayload>with an optionalpayloadValidatorhost parser narrowing the opaque storedpayloadat the client boundary on write and read — nov.any()dump, no unchecked cast. - Bounded, self-rescheduling
prune(take(batch)+ scheduler) that removes only terminal messages past theirupdatedAtcutoff, plus a built-in daily prune cron (crons.ts); idempotent. Default retention 30 days. - Mount-safe: correct under multiple
app.use(component, { name })mounts — each instance is sandboxed, the cron is registered per instance. - Optional generic SMTP transport (
@vllnt/convex-email/smtp) — sends a queued message over any SMTP server (Stalwart, Postfix, any provider's relay). The server is host config.sendViaSmtp(transport, message, config?)— the pure, injectable send core (driven by an injectedSmtpTransport), plusvalidateSmtpConfigandtoMailOptions. The validators reject CR/LF (SMTP header) injection in every address, subject, and header value.createSmtpTransport(config)/createSmtpSender(config)— the thinnodemailerwrapper, called from the host's own"use node"action.example/convex/includesflushQueuedOverSmtp— the queue→send wiring (listByStatus("queued")→markSending→ send →markSent/markFailed) exercised end to end against the component runtime with a fake transport.
nodemaileris an optional peer dependency (^8.0.4— the floor that fixes theenvelope.sizeCRLF injection advisory GHSA-c7w3-x93f-qmm8 / CVE-2025-14874). The queue core still installs and runs with zero third-party runtime deps; only a host importing@vllnt/convex-email/smtppullsnodemailer.- Optional generic JMAP transport (
@vllnt/convex-email/jmap) — sends a queued message over any JMAP server's HTTP API (Stalwart, Fastmail, Cyrus, Apache James). JMAP is the protocol (RFC 8620/8621); the server is host config, so no vendor is baked in — the adapter is./jmap, never./stalwart.- Runs in a plain Convex action — JMAP is HTTP, so
fetchworks in V8: no"use node", nonodemailer, zero extra dependencies (unlike the SMTP adapter's raw socket). - Pure, injected-
fetchcore —sendViaJmap(fetchFn, message, config),discoverJmapSession(fetchFn, opts)(resolves account / identity / Sent mailbox from the JMAP session),createJmapSender(config, fetchFn), plusvalidateJmapConfig/buildEmailCreate/buildSubmitRequest/parseSubmitResponse. The whole adapter is 100% covered with a fakefetch(no excluded wrapper); it rejects CR/LF header injection in every address, subject, and header value. example/convex/addsflushQueuedOverJmap(the queue→JMAP wiring) andflushQueuedRouted(one queue routed per message by itstransporttag —smtpvsjmap), exercised end to end against the component runtime with a fakefetch.
- Runs in a plain Convex action — JMAP is HTTP, so
Fixed
- Apply the documented 30-day terminal-message retention and reject invalid prune batches to prevent premature audit deletion and scheduler loops.
Changed
- Treat Convex
_generatedoutput as CLI-owned, exclude it from formatting, and expose a dedicated codegen script. - Refresh all direct dependencies to their latest compatible releases .
- Require
convex@^1.45.0and updateconvex-testto^0.0.56.
- First release of
Licence
Released under the MIT licence. The full text is in the source repository.
[ PACKAGE ]
- Stable
- 0.1.0
- Canary
- 0.1.1-canary.51546d7
- GitHub stars
- 2 GitHub stars
- Licence
- MIT
- Issues
- Open an issue