EmDash Mail
EmDash Mail is a small, production-minded EmDash plugin for outbound transactional email delivery. It is the general mail pipeline plugin for EmDash system mail and other plugin- or core-generated email, distinct from form-mailer.
Plugin/package ID: emdash-mail
What It Does
EmDash Mail owns outgoing delivery for EmDash-generated email such as:
- invitations
- magic links
- password reset or recovery
- other transactional mail emitted through EmDash's email pipeline
It does not:
- collect public form submissions
- provide form spam protection
- implement newsletter or campaign tooling
- replace
form-mailer
form-mailer remains the narrow public-form plugin. EmDash Mail is the general outbound delivery layer.
Current v1 Provider Scope
Implemented now:
consolezeptomail
Present in settings but intentionally not implemented yet:
cloudflare
Cloudflare Worker binding delivery is planned as an optional companion plugin because the currently verified EmDash standard-plugin runtime does not expose a confirmed binding path for a sandboxed email:deliver transport plugin.
EmDash Integration Model
This plugin is an EmDash email provider plugin:
- capability:
email:provide - hook:
email:deliver
EmDash core or other plugins call the email pipeline. This plugin is the transport provider selected for delivery.
Capabilities
email:provideRegisters the exclusiveemail:deliverprovider hook.network:fetchUsed for ZeptoMail's HTTP API.
Allowed hosts are intentionally narrow:
api.zeptomail.com
Installation
Marketplace install
- Install
EmDash Mailfrom the EmDash marketplace. - Enable the plugin in your EmDash site.
- Open the plugin settings page at
EmDash Mail. - Save sender and provider settings.
- If your site exposes EmDash's global email-provider selection, select
emdash-mailas the active provider plugin.
Local/dev install
import { defineConfig } from "emdash";
import { emdashMailPlugin } from "emdash-mail";
export default defineConfig({
plugins: [emdashMailPlugin()]
});
Then:
- Run
npm install - Run
npm run build - Start your EmDash site with the plugin enabled
Build artifacts are written to:
dist/index.mjsdist/sandbox-entry.mjs
Settings
Enable pluginMaster kill switch for delivery.Providerconsole,zeptomail, orcloudflareplaceholder.Sender nameOptional display name for outgoing mail.Sender addressRequired sender address.Default reply-to addressOptional reply-to applied by providers that support it.Test recipient addressUsed by the admin test-send flow.Subject prefixOptional prefix prepended to subjects.ZeptoMail API keyOne-way write secret.
Secrets are never rendered back into the UI. The admin page only shows whether a secret is stored.
Local Development
Recommended path:
- use provider
console
The console provider never sends real mail. It writes structured logs and returns a fake message ID, which makes it suitable for local development and system tests.
ZeptoMail Setup
- Verify your sending domain in ZeptoMail.
- Create an API key in ZeptoMail.
- Save the API key in the
EmDash Mailadmin settings. - Set provider to
zeptomail. - Run the test-send flow from the admin page.
EmDash Mail only fetches https://api.zeptomail.com.
Cloudflare Status
Cloudflare Email Service itself can support both Workers bindings and a REST API. Official docs:
- Cloudflare Email Service: Send emails
- Cloudflare Email Service: Workers API
- Cloudflare Email Service: Local development
This standard plugin does not directly implement Cloudflare Worker binding delivery. The intended product shape is:
- keep
emdash-mailas the marketplace/catalog-safe mail plugin - add Cloudflare Worker binding delivery through an optional native companion plugin
Planned companion repo:
If we later decide to support Cloudflare REST API mode inside the standard plugin, that should be a separate provider mode with explicit API-token settings and documentation.
Logging and Runtime Notices
Successful sends log structured metadata with ctx.log.info().
Failed sends:
- log structured errors with
ctx.log.error() - persist a sanitized admin-visible runtime notice
- expire that notice after 7 days
Troubleshooting
Plugin disabled
Enable the plugin in settings before using it as the active provider.
ZeptoMail selected but no API key stored
Store a ZeptoMail API key in the settings page.
Cloudflare selected
Cloudflare Worker binding delivery requires the optional native companion plugin.
Test send fails
Check:
- plugin enabled
- valid sender address
- valid test recipient address
- provider-specific credentials
Relationship to form-mailer
form-mailer is for public form submission handling.
EmDash Mail is for outbound mail delivery.
If EmDash core or another plugin emits email because of a form workflow, EmDash Mail can still be the transport provider. It simply does not own the form workflow itself.