{"_id":"emdash-plugin-cloudflare-email","name":"emdash-plugin-cloudflare-email","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"emdash-plugin-cloudflare-email","version":"0.1.0","description":"EmDash CMS email-provider plugin that delivers via the native Cloudflare Email Sending Workers binding. No API token required.","type":"module","main":"dist/index.mjs","types":"dist/index.d.mts","exports":{".":{"import":"./dist/index.mjs","types":"./dist/index.d.mts"},"./sandbox":{"import":"./dist/sandbox-entry.mjs","types":"./dist/sandbox-entry.d.mts"}},"scripts":{"build":"tsdown src/index.ts src/sandbox-entry.ts --format esm --dts --clean","dev":"tsdown src/index.ts src/sandbox-entry.ts --format esm --dts --watch","typecheck":"tsc --noEmit","prepublishOnly":"pnpm build"},"keywords":["emdash","cms","plugin","email","cloudflare","cloudflare-workers","email-sending","transactional-email"],"author":{"name":"Velvee","email":"hello@velvee.ai"},"license":"MIT","homepage":"https://github.com/velvee-ai/emdash-plugin-cloudflare-email#readme","repository":{"type":"git","url":"git+https://github.com/velvee-ai/emdash-plugin-cloudflare-email.git"},"bugs":{"url":"https://github.com/velvee-ai/emdash-plugin-cloudflare-email/issues"},"peerDependencies":{"emdash":"^0.5.0"},"devDependencies":{"@cloudflare/workers-types":"^4.20260424.1","emdash":"^0.7.0","tsdown":"^0.21.7","typescript":"^5.5.0"},"gitHead":"e71b9d5fff79a086432166ee7525c7ee70a07e76","_id":"emdash-plugin-cloudflare-email@0.1.0","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-SaGj1icouAhyR0br5dE0YlzkBnnlPnJRKF1CJeOvAb9YYPP81Pz2LI3eiRbb4AoTORjk9FxPML0PDhWjdjMVdQ==","shasum":"1fdf4590347f22730b84766de62f96d247095ebd","tarball":"https://registry.npmjs.org/emdash-plugin-cloudflare-email/-/emdash-plugin-cloudflare-email-0.1.0.tgz","fileCount":7,"unpackedSize":12350,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDVN10Pc1Bwt+BjQw+NUuDeR1k6liWkFSFOXDxDgLlwXgIhAKf1/FgxUbNoBqX1RpzJo1kvi9xTApmXXPRXmmXIt8Hf"}]},"_npmUser":{"name":"sathish-velvee","email":"sathish@velvee.ai"},"directories":{},"maintainers":[{"name":"sathish-velvee","email":"sathish@velvee.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/emdash-plugin-cloudflare-email_0.1.0_1777270853719_0.9832159485765131"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-27T06:20:53.550Z","0.1.0":"2026-04-27T06:20:53.844Z","modified":"2026-04-27T06:20:54.061Z"},"maintainers":[{"name":"sathish-velvee","email":"sathish@velvee.ai"}],"description":"EmDash CMS email-provider plugin that delivers via the native Cloudflare Email Sending Workers binding. No API token required.","homepage":"https://github.com/velvee-ai/emdash-plugin-cloudflare-email#readme","keywords":["emdash","cms","plugin","email","cloudflare","cloudflare-workers","email-sending","transactional-email"],"repository":{"type":"git","url":"git+https://github.com/velvee-ai/emdash-plugin-cloudflare-email.git"},"author":{"name":"Velvee","email":"hello@velvee.ai"},"bugs":{"url":"https://github.com/velvee-ai/emdash-plugin-cloudflare-email/issues"},"license":"MIT","readme":"# emdash-plugin-cloudflare-email\n\nEmDash CMS email-provider plugin that delivers transactional email through the\nnative [Cloudflare Email Sending](https://developers.cloudflare.com/email-service/email-sending/)\nWorkers binding. **No API token required** — auth happens via the binding.\n\nWhy this plugin instead of [`emdash-plugin-resend`](https://www.npmjs.com/package/emdash-plugin-resend)?\nIf your EmDash Worker already runs on Cloudflare, this is one less third-party\ndependency, one less API key to manage, and one less HTTP hop.\n\n## Requires\n\n- [EmDash](https://emdashcms.com) `>= 0.5.0`\n- A Cloudflare Workers deployment (this is a trusted-mode plugin — see\n  [Caveats](#caveats))\n- A domain onboarded for Cloudflare Email Sending (see [Setup](#setup))\n\n## Install\n\n```bash\nnpm install emdash-plugin-cloudflare-email\n# or pnpm add emdash-plugin-cloudflare-email\n```\n\n## Setup\n\n### 1. Onboard your domain to Cloudflare Email Sending (one-time)\n\n```bash\nnpx wrangler email sending enable yourdomain.com\n```\n\n…or use the Cloudflare dashboard: **Compute & AI → Email Service →\nEmail Sending → Onboard Domain**. This adds SPF / DKIM / DMARC records to\nyour zone (DNS propagates in 5–15 min). To avoid touching SPF on a domain\nyou already use for human mail (e.g. Google Workspace), onboard a subdomain\nlike `mail.yourdomain.com` instead — the plugin's From address then\nbecomes `noreply@mail.yourdomain.com`.\n\n### 2. Add the binding to `wrangler.jsonc`\n\n```jsonc\n{\n  \"send_email\": [\n    { \"name\": \"EMAIL\" }\n  ]\n}\n```\n\nThe binding name **must be `EMAIL`** in this release (configurable in a\nfuture version — see [Roadmap](#roadmap)).\n\n### 3. Wire the plugin into `astro.config.mjs`\n\n```ts\nimport { defineConfig } from 'astro/config'\nimport emdash from 'emdash/astro'\nimport cloudflareEmail from 'emdash-plugin-cloudflare-email'\n\nexport default defineConfig({\n  integrations: [\n    emdash({\n      plugins: [cloudflareEmail()],\n    }),\n  ],\n})\n```\n\n### 4. Configure the From address in the admin UI\n\nNavigate to **EmDash Admin → Cloudflare Email** and enter your From\naddress — for example `Your App <noreply@yourdomain.com>`. Save and use\nthe **Send Test Email** button to verify delivery.\n\nThat's it. EmDash's `email:deliver` hook is now wired to the binding —\ninvitations, magic links, password recovery, and any custom plugin emails\nwill route through Cloudflare.\n\n## Caveats\n\n- **Trusted-mode only.** The plugin uses the Workers `send_email` binding,\n  which is only accessible to plugins running in the host Worker isolate\n  (`plugins: []` in `astro.config.mjs`). Sandboxed plugins\n  (`sandboxed: []`) run in isolated V8 isolates without access to host\n  bindings — install this plugin in trusted mode.\n- **Astro 6 + `@astrojs/cloudflare` v13+** is required, because the plugin\n  uses `import { env } from 'cloudflare:workers'` to access the binding.\n- **Domain onboarding is irreducible.** Cloudflare needs to know which\n  domain you're allowed to send from before you can send. There's no way\n  to skip step 1.\n\n## Roadmap\n\n- `binding` option to override the binding name from `EMAIL` (e.g.\n  `cloudflareEmail({ binding: 'NOTIFY_EMAIL' })`)\n- Attachment support (currently only `to`/`from`/`subject`/`html`/`text`/`cc`/`bcc`/`replyTo` pass through)\n- Restricted-binding support (e.g. `allowed_sender_addresses`)\n\nPRs welcome.\n\n## License\n\nMIT © Velvee\n","readmeFilename":"README.md","_rev":"1-01011300cfd3f0ea12fca85bf555e9b0"}