Skip to content

feat: add email worker using Cloudflare Email Sending API#856

Open
decofe wants to merge 1 commit intomainfrom
georgios/email-worker
Open

feat: add email worker using Cloudflare Email Sending API#856
decofe wants to merge 1 commit intomainfrom
georgios/email-worker

Conversation

@decofe
Copy link
Copy Markdown
Member

@decofe decofe commented Apr 16, 2026

Adds a new apps/email Cloudflare Worker for sending transactional emails using the Cloudflare Email Sending API (SEND_EMAIL binding).

Changes

  • apps/email/src/index.ts — Hono worker with POST /send endpoint, validates request body with Zod against the SendEmail.send() builder signature
  • apps/email/wrangler.json — Worker config with send_email binding
  • AGENTS.md — Added email app to existing apps table

Usage

curl -X POST https://<worker-url>/send \
  -H 'Content-Type: application/json' \
  -d '{
    "from": {"email": "noreply@tempo.xyz", "name": "Tempo"},
    "to": ["user@example.com"],
    "subject": "Hello from Tempo",
    "text": "Hello World!",
    "html": "<h1>Hello World!</h1>"
  }'

Testing

cd apps/email && pnpm check  # biome + types pass

Prompted by: georgios

Co-Authored-By: Georgios Konstantopoulos <17802178+gakonst@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d97dc-ce6e-7796-b5e0-6357d51e29db
@github-actions
Copy link
Copy Markdown

Bundle Size Report

Metric Size Δ Change
Total 4.2 MB -606.3 KB (-12.4%)
Gzip 1.2 MB -101.0 KB (-7.6%)
Brotli 1.0 MB -80.7 KB (-7.0%)
Chunk changes (>1KB)
Chunk Change
assets/KeyManager.js (removed) -477.4 KB
assets/QueryBuilder.js (removed) -423.4 KB
assets/router.js -298.3 KB
assets/wagmi.config.js -283.2 KB
assets/_hash.js -128.1 KB
assets/BaseTanStackRouterDevtoolsPanel-Bmws3ikM.js (removed) -99.5 KB
assets/Intro.js (removed) -66.0 KB
assets/createSsrRpc.js (removed) -43.8 KB
assets/isAddressEqual.js -33.5 KB
assets/Hash.js (removed) -31.0 KB
assets/path.js (removed) -30.6 KB
assets/FloatingTanStackRouterDevtools-B7vy70jP.js (removed) -24.4 KB
assets/_layout.js -22.2 KB
assets/stringify.js (removed) -19.7 KB
assets/address.js -14.1 KB
assets/Address.js -13.1 KB
assets/getAction.js -13.0 KB
assets/base.js (removed) -12.8 KB
assets/utils.js -10.1 KB
assets/token.server.js (removed) -9.8 KB
...and 41 more

Compared against main branch (baseline from 2/4/2026, 5:13:51 PM)

@github-actions
Copy link
Copy Markdown

Cloudflare Deployments

App Environment Status Preview
explorer devnet [OK] Deployed View Preview
explorer mainnet [OK] Deployed View Preview
explorer testnet [OK] Deployed View Preview
fee-payer devnet [OK] Deployed View Preview
fee-payer moderato [OK] Deployed View Preview
fee-payer privy [OK] Deployed View Preview
og - [OK] Deployed View Preview
perf - [OK] Deployed View Preview
tokenlist - [OK] Deployed View Preview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants