@ecropolis/emdash-plugin-compass-mail
v0.1.0
Published
Email transport for EmDash CMS: delivers the email pipeline through SendGrid or Resend with your own API key
Maintainers
Readme
Compass Mail — an EmDash CMS email transport
EmDash ships an email pipeline but no production transport: out of the box, ctx.email.send() works in dev (console provider) and throws in production. Compass Mail is the missing piece — a provider plugin that registers the exclusive email:deliver hook and sends through SendGrid or Resend with your own API key.
Every email feature in EmDash rides on this once selected: auth emails (magic links, invites), plugin notifications (e.g. Compass Forms submission alerts), and anything else that calls ctx.email.send().
Install
npm install @ecropolis/emdash-plugin-compass-mail// astro.config.mjs
import compassMail from "@ecropolis/emdash-plugin-compass-mail";
export default defineConfig({
integrations: [
emdash({
// ...
plugins: [compassMail()],
}),
],
});Standard-format plugin — the same code runs trusted (as above) or sandboxed.
Configure
- Plugins → Compass Mail → Settings: choose the provider, paste an API key with mail-send permission, and set the from address (and optional from name). The from address must be a verified sender — or on an authenticated domain — with your provider; that's a provider-side requirement, not ours.
- Settings → Email: select Compass Mail as the delivery provider.
- Send a test email from the same screen.
Behavior
- Uses the plugin
ctx.httpfetch (hosts allowlisted toapi.sendgrid.comandapi.resend.com), so it is sandbox-compatible. - Throws with the provider's error detail on rejection — a failed send fails the pipeline call, and callers decide whether that's fatal (Compass Forms, for example, never loses a stored submission over a failed notification).
- The API key is a
secretsetting: encrypted at rest, never shown again after saving. - No queuing or retries in v1 — sends are synchronous with the pipeline call.
License
MIT © Ecropolis
