Skip to content

[ 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).

terminal
pnpm add @vllnt/convex-email
pnpm add @vllnt/convex-email@canary

Register the component

Add it to your app’s convex/convex.config.ts, then run npx convex dev to generate the references.

convex/convex.config.ts
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.

Read the 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
WeekDownloads
14 June 2026 to 15 June 2026141
16 June 2026 to 22 June 2026464
23 June 2026 to 29 June 2026111
30 June 2026 to 6 July 2026118
7 July 2026 to 13 July 202687
14 July 2026 to 20 July 202639
21 July 2026 to 27 July 202615
28 July 2026 to 3 August 20265
4 August 2026 to 10 August 202612
11 August 2026 to 17 August 202687
18 August 2026 to 24 August 202622
25 August 2026 to 31 August 2026333
1 September 2026 to 7 September 2026378
8 September 2026 to 14 September 202647
15 September 2026 to 21 September 202619
22 September 2026 to 28 September 202614
29 September 2026 to 5 October 202612
6 October 2026 to 12 October 202617
13 October 2026 to 19 October 202616
20 October 2026 to 26 October 202620
27 October 2026 to 2 November 2026327
3 November 2026 to 9 November 202685
10 November 2026 to 16 November 2026221
17 November 2026 to 23 November 202631

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
VersionKindPublished
0.1.1-canary.51546d7canary15 November 2026
0.1.1-canary.4d322a9canary31 October 2026
0.1.1-canary.d88db7ccanary31 October 2026
0.1.0stable1 September 2026
0.1.0-canary.904430fcanary1 September 2026
0.1.0-canary.38d9dc0canary31 August 2026
0.1.0-canary.995e47fcanary31 August 2026
0.1.0-canary.3ab60aacanary31 August 2026
0.1.0-canary.0c81afacanary16 June 2026
0.1.0-canary.ad66628canary16 June 2026
0.1.0-canary.e84a2a7canary16 June 2026
0.1.0-canary.63aca6bcanary14 June 2026

Changelog

The newest stable releases of @vllnt/convex-email, with the notes from its changelog.

  1. 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 (transport is 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 in queued and returns its id immediately; messageId is host-supplied and must be unique. An idempotencyKey dedups a re-enqueue (deduplicated: true) so a retry never double-sends.
    • markSending(messageId) claims a queued message for a send attempt (increments attempts); markSent(messageId, { providerId? }) records a terminal success; markFailed(messageId, { error? }) re-queues while attempts < maxAttempts else lands in terminal failed.
    • get(messageId) returns the current envelope (or null); 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/failed is rejected with ConvexError({ code: "TERMINAL_STATE" }), so a late or duplicate delivery callback can never overwrite a recorded outcome; markSent is idempotent.
    • Server-sourced time: every handler stamps createdAt/updatedAt from Date.now() inside the mutation — no caller-supplied clock.
    • Typed generics: Email<TPayload> with an optional payloadValidator host parser narrowing the opaque stored payload at the client boundary on write and read — no v.any() dump, no unchecked cast.
    • Bounded, self-rescheduling prune (take(batch) + scheduler) that removes only terminal messages past their updatedAt cutoff, 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 injected SmtpTransport), plus validateSmtpConfig and toMailOptions. The validators reject CR/LF (SMTP header) injection in every address, subject, and header value.
      • createSmtpTransport(config) / createSmtpSender(config) — the thin nodemailer wrapper, called from the host's own "use node" action.
      • example/convex/ includes flushQueuedOverSmtp — the queue→send wiring (listByStatus("queued") → markSending → send → markSent/markFailed) exercised end to end against the component runtime with a fake transport.
    • nodemailer is an optional peer dependency (^8.0.4 — the floor that fixes the envelope.size CRLF 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/smtp pulls nodemailer.
    • 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 fetch works in V8: no "use node", no nodemailer, zero extra dependencies (unlike the SMTP adapter's raw socket).
      • Pure, injected-fetch core — sendViaJmap(fetchFn, message, config), discoverJmapSession(fetchFn, opts) (resolves account / identity / Sent mailbox from the JMAP session), createJmapSender(config, fetchFn), plus validateJmapConfig / buildEmailCreate / buildSubmitRequest / parseSubmitResponse. The whole adapter is 100% covered with a fake fetch (no excluded wrapper); it rejects CR/LF header injection in every address, subject, and header value.
      • example/convex/ adds flushQueuedOverJmap (the queue→JMAP wiring) and flushQueuedRouted (one queue routed per message by its transport tag — smtp vs jmap), exercised end to end against the component runtime with a fake fetch.
    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 _generated output 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.0 and update convex-test to ^0.0.56.
All releases of @vllnt/convex-email
Stable releases
RSSAtomJSON Feed
Canary builds
RSSAtomJSON Feed

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

Theme