@sayedhfatimi/convex-email 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +18 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -9,7 +9,7 @@ A provider-neutral email component for [Convex](https://convex.dev). One client
9
9
  - Inbound mail (Resend receiving, SES receipt rules, or raw MIME you hold) is parsed, cleaned, threaded and handed to your `onInbound` function.
10
10
  - Optional tenants: one deployment can serve several customers, each with their own provider account.
11
11
 
12
- Status: 0.1.0 is not released yet. Resend and SES have been exercised against fakes and recorded payloads; the items still to be confirmed against the live providers are listed under [Not yet verified live](#not-yet-verified-live).
12
+ Status: released (0.1.x) and tested live against Resend and Amazon SES. What was confirmed, and what is still open, is under [Verified live, and what is not yet](#verified-live-and-what-is-not-yet).
13
13
 
14
14
  The component runs entirely in Convex's default runtime. Components cannot contain `"use node"` files, so HTML cleaning, SNS signature checks and SigV4 signing all use runtime-neutral libraries.
15
15
 
@@ -570,7 +570,7 @@ Resend dedupes sends through the `Idempotency-Key` header, which the component s
570
570
 
571
571
  ## Amazon SES set-up
572
572
 
573
- 1. **Identity.** Verify the domain (or address) you send from in SES, in the region you will use, and move the account out of the sandbox.
573
+ 1. **Identity.** Verify the domain (or address) you send from in SES, in the region you will use, and move the account out of the sandbox. While the account is still in the sandbox, SES only delivers to verified identities, and it checks the sender's IAM permission against the **recipient's** identity as well. So add each verified recipient's identity ARN (for example `arn:aws:ses:<region>:<account>:identity/you@example.org`) to the `ses:SendEmail` resources in step 5, or every send to it fails with `AccessDeniedException`. SES's mailbox simulator addresses are exempt.
574
574
  2. **Configuration sets, one per stream.** Create a configuration set for the transactional stream (and a second one for bulk if you want separate reputation and metrics). Add an event destination to each that publishes to an SNS topic, with the event types `Send`, `Delivery`, `DeliveryDelay`, `Bounce`, `Complaint`, `Reject` and `Rendering Failure`. Return them as `configurationSets: { transactional, bulk? }`; a bulk send uses the transactional set when no bulk one is given.
575
575
  3. **SNS to the webhook.** Subscribe each topic over HTTPS to `https://<deployment>.convex.site/email/webhook/ses` (or the per-tenant route). The component confirms the subscription itself. It verifies every SNS message signature (the signing certificate is fetched only from an `sns.<region>.amazonaws.com` host) and refuses topics that are not listed: put every topic ARN, including the inbound one, in `trustedTopicArns`. A failed verification is a 401; a certificate that cannot be fetched (network error, timeout, non-2xx) is a 500, so SNS delivers the message again.
576
576
  4. **Inbound (optional).** Verify the receiving domain's MX record, create an S3 bucket, and add a receipt rule with an S3 action that writes to the bucket and notifies an SNS topic (the notification must carry the bucket and object key, so set the topic on the S3 action). Subscribe the topic to the same webhook. List the bucket in `inboundBuckets`: the adapter will only read buckets named there, and with none listed it refuses all inbound fetches. SES receiving is only available in some regions.
@@ -605,7 +605,7 @@ The `ses:FromAddress` condition stops the key from being used to send as any oth
605
605
 
606
606
  Return `{ provider: "ses", region, accessKeyId, secretAccessKey, sessionToken?, configurationSets, trustedTopicArns, inboundBuckets }` from your callback.
607
607
 
608
- SES chooses the `Message-ID` itself, so the component sends none: it learns the real one from the `Send` event and updates the message. The tenant, when there is one, is sent as the SES `TenantName`.
608
+ SES chooses the `Message-ID` itself, so the component sends none. It records the id SES puts in the delivered header, `<MessageId@<region>.amazonses.com>` (`<MessageId@email.amazonses.com>` in us-east-1). SES's events carry only the bare `MessageId`, without `@`, which is never allowed to replace it. Replies quote the full form in `In-Reply-To`, so they thread. The tenant, when there is one, is sent as the SES `TenantName`.
609
609
 
610
610
  ## Capabilities
611
611
 
@@ -676,14 +676,23 @@ export const exampleCrons = () => {
676
676
 
677
677
  where `internal.email.cleanup` is the `internalMutation` in the example app that calls `mail.cleanup(ctx, { olderThanMs: 90 * 24 * 60 * 60 * 1000 })`.
678
678
 
679
- ## Not yet verified live
679
+ ## Verified live, and what is not yet
680
680
 
681
- These points depend on how the real providers behave and are confirmed in a live test before 0.1.0 is released:
681
+ Checked against the real services on 2026-12-03, on Resend and on SES in eu-north-1 (in the sandbox):
682
682
 
683
- - Whether Resend keeps the `Message-ID` header the component generates (the component relies on it to match replies to messages).
684
- - The format of the SES `Message-ID` host (the adapter derives `<id@email.amazonses.com>` or a regional host; the `Send` event's value replaces it).
685
- - The field names of Resend's Receiving API and `email.received` webhook.
686
- - How large a message the default runtime can send and receive (the 10 MiB cap is deliberately conservative until then).
683
+ - **Resend** replaces the component's `Message-ID` with its own. The component records the real one from the events, and replies thread.
684
+ - **SES** delivers the header `<MessageId@eu-north-1.amazonses.com>`, which the component records, and replies thread.
685
+ - **Resend's Receiving API and its `email.received` webhook** match the adapter. The test fixtures are captured real payloads, with personal data replaced.
686
+ - **Bounces and complaints** (both providers' simulators) suppress the address, and a late `delivered` event does not undo a complaint.
687
+ - **Inbound on SES** works end to end (MX, receipt rule, S3, SNS, the component), with SES's own SPF/DKIM/DMARC verdicts.
688
+ - **Switching providers** (`sendVia` from SES back to Resend) keeps suppressions.
689
+
690
+ Not yet verified live:
691
+
692
+ - The us-east-1 SES header host (`email.amazonses.com`), which is covered by tests only.
693
+ - A send for a tenant on SES (SES `TenantName`).
694
+ - A late Resend event arriving after switching to SES.
695
+ - How large a message the default runtime can send and receive. The 10 MiB cap is deliberately conservative until then.
687
696
 
688
697
  ## Development
689
698
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sayedhfatimi/convex-email",
3
3
  "description": "A provider-neutral email component for Convex, with Resend and Amazon SES adapters.",
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "license": "Apache-2.0",
6
6
  "author": "sayedhfatimi",
7
7
  "homepage": "https://github.com/sayedhfatimi/convex-email#readme",