Contact Mail

Contact forms that email you and store nothing. Several forms, custom fields, auto-replies, Turnstile. English and Japanese.

View source
Public name@endbear.dev/contact-mail

Or open Registry in your EmDash admin and search for this name.

Overview

Contact Mail sends contact-form messages straight to your inbox and never stores them on your site. Names, email addresses and message bodies are not written to the database; only a delivery log (time, form, result, character count) is kept for 90 days.

  • Several forms, each at its own URL (for example /contact and /work/apply)
  • 11 field types (text, email, phone, URL, number, date, dropdown, radio, checkboxes, consent) with validation presets, checked in the browser and again on the server
  • Input → review → sent flow
  • Editable emails: the notification to you and an optional auto-reply, with placeholders such as {{name}} and {{all_fields}}
  • Spam protection: Cloudflare Turnstile, a honeypot field and an hourly limit per sender (IP addresses are hashed, never stored)
  • Admin in English and Japanese; each public form can be English or Japanese

If an email cannot be sent, nothing is saved and the sender is told it did not go through.

Permissions

Plugins get only the capabilities they declare and you approve. Your EmDash admin lists these again before anything installs.

  • Make network requests

    Connect to the publisher-declared external hosts.

    Allowed hosts

    • challenges.cloudflare.com
  • Send email

    Send email through your site’s configured mail service.

FAQ

Is anything stored? Only a delivery log: time, form name, result, failure reason and the number of characters entered. It is deleted after 90 days. A salted hash of the sender's IP address is kept for up to two days for the hourly limit.

What happens if the email fails? Nothing is saved. The sender sees an error asking them to try again later, and the log records the failure.

Can someone abuse the auto-reply? The auto-reply goes to the address typed into the form, so it could be pointed at someone else. Turnstile and the hourly limit apply, and we recommend keeping free-text fields out of the auto-reply body.

The "Plugin pages" button in the plugin list shows an error. This is an EmDash 1.6 issue: that button opens the plugin without a page name. Use the Contact Mail entries in the sidebar instead.

Why does the browser Back button leave the forms screen? Admin screens built with Block Kit do not change the URL as you move between them. Use the back buttons at the top of each screen.

Security

  • Messages are never stored. Only a delivery log without personal data is kept (90 days).
  • Sender IP addresses are hashed with a per-site random salt before counting, and the counters are deleted after two days.
  • The Turnstile secret key is stored encrypted with EMDASH_ENCRYPTION_KEY and never shown in the admin.
  • Every public input is validated on the server against the form definition; email header injection is prevented by stripping line breaks from subjects and addresses.
  • Outbound network access is limited to challenges.cloudflare.com.

Report vulnerabilities privately to endbear.dev@gmail.com. Please do not open a public issue for security problems.

Changelog

0.1.0

First release: multiple forms at their own URLs, 11 field types with validation presets, editable notification and auto-reply emails, Turnstile, honeypot and hourly limit, delivery log, admin in English and Japanese.

Installation

  1. Set up email delivery for your EmDash site (Settings → Email, for example SMTP). Contact Mail sends through it.

  2. Create Cloudflare Turnstile keys in the Cloudflare dashboard (Turnstile → Add widget) for your site's domain.

  3. Install Contact Mail from the registry and approve its access (send email; call challenges.cloudflare.com to verify Turnstile; public routes for the form).

  4. Add the form pages to your site — one package, one line:

    npm install emdash-contact-mail
    
    // astro.config.mjs
    import contactMail from "emdash-contact-mail/astro";
    
    integrations: [emdash({ /* … */ }), contactMail({ layout: "./src/layouts/Base.astro" })],
    

    A sandboxed plugin cannot add pages, so this small Astro integration does it. layout is optional: your layout receives title, description and lang and renders <slot />. The plugin ID is found automatically. Forms take priority over other pages at the same URL. Restyle with the --cm-* CSS variables.

  5. Open Contact Mail → Settings in the admin sidebar and enter the recipient address and both Turnstile keys.

  6. Open Contact Mail → Forms, adjust the first form (it lives at /contact) and visit the page.

Keep exploring

More plugins like Contact Mail

Browse by keyword, or see everything @endbear.dev publishes.

Install on your site

Open in EmDash

Contact Mail

@endbear.dev/contact-mail

Choose the EmDash site where you want to review this plugin. Nothing is installed until you confirm its permissions in that site's admin.

This browser will remember the site. You can change it next time.