emdash-resend
v1.0.0
Published
Resend email provider plugin for EmDash CMS
Maintainers
Readme
emdash-resend
Resend email provider plugin for EmDash CMS.
EmDash ships no production email transport — only a dev-console stub — so magic-link login, invites, password recovery and comment notifications all fail with "Email is not configured" until you add a provider. This plugin delivers them through Resend.
If you deploy on Cloudflare Workers, consider the first-party
cloudflareEmail() provider instead — it uses the
native send_email binding and needs no API key at all. Use this plugin when you want Resend
specifically, or when you are not on Workers.
Install
npm install emdash-resendRequires EmDash >=0.23.0.
Setup
1. Verify your sending domain in Resend
Add and verify the domain you will send from at resend.com/domains. Resend rejects mail from an unverified sender. Then create an API key at resend.com/api-keys.
2. Register the plugin
// astro.config.mjs
import emdash from "emdash/astro";
import { resendEmail } from "emdash-resend";
export default defineConfig({
integrations: [
emdash({
plugins: [
resendEmail({
apiKey: process.env.RESEND_API_KEY,
from: { email: "[email protected]", name: "My Site CMS" },
replyTo: "[email protected]", // optional
}),
],
}),
],
});Provide RESEND_API_KEY the way your platform does secrets — wrangler secret put RESEND_API_KEY on
Cloudflare, or your host's environment settings elsewhere. The key is read from the environment and is
never written to the database.
Misconfiguration fails fast: a missing or malformed apiKey or from throws at config time rather than
on the first send.
3. Activate and select it
- Admin → Extensions — activate emdash-resend.
- Settings → Email — select it as the email provider, then use the test-send to confirm delivery.
In development EmDash also registers its console provider, so two providers are available and neither is auto-selected. You must pick one in Settings → Email.
Configuration
| Option | Type | Required | Description |
| --- | --- | --- | --- |
| apiKey | string | Yes | Resend API key. Source from the environment. |
| from | string \| { email, name? } | Yes | Sender address. Must be on a domain verified in Resend. |
| replyTo | string | No | Reply-To address, for when from is a no-reply address. |
replyTo is configured per-site rather than per-message because EmDash's EmailMessage carries only
to, subject, text and html — there is no per-message reply-to to forward.
License
MIT © Zach Bimson
