Zero JavaScript, zero islands
No client:load, no framework component, no hydration cost. The form is static HTML, which is exactly what Astro ships fastest.
integrations · framework
An Astro contact form doesn't need an SSR adapter, an API endpoint, or a framework island. Astro renders plain HTML by default, and a plain HTML form is all a contact form needs: point its action at your mailcontact endpoint and submissions land in your project's inbox, with a notification in Discord, Slack, email, or a webhook.
It ships zero JavaScript, works with Astro's fully static output on any host, and keeps working if you later add an adapter, because it's markup in a .astro page, not a plugin or a server route.
the snippet
Point the form at your project's mailcontact endpoint. Submissions land in your project inbox. No server, no API route, no email service to wire up.
---
// No frontmatter needed: the form is plain HTML.
---
<form action="https://mailcontact.app/api/forms/your-form-id" method="POST">
<input type="text" name="name" placeholder="Your name" required />
<input type="email" name="email" placeholder="you@email.com" required />
<textarea name="message" placeholder="What's on your mind?" required></textarea>
<button type="submit">Send</button>
</form>how it works
One inbox per project. Name it after your site and you get a form endpoint and a project email address immediately.
Drop the markup above into any .astro page or component: src/pages/contact.astro, a footer, a layout. It's your HTML; style it however you like.
Add a Discord, Slack, email, or webhook channel. Every submission pings you where you already are.
why mailcontact
No client:load, no framework component, no hydration cost. The form is static HTML, which is exactly what Astro ships fastest.
Astro's server endpoints need an adapter and a server to run on. Posting to an external endpoint keeps your build fully static. astro build, upload, done.
Astro makes it cheap to spin up marketing sites, docs, and side projects. Each one gets its own inbox and its own address instead of piling into your personal email.
faq
Not by itself. A statically built Astro site has nothing running to receive a POST. Pointing the form's action at a mailcontact endpoint fixes that: mailcontact's servers accept the submission and your site stays fully static.
Yes. The endpoint accepts cross-origin posts from any domain, so the form works wherever your static output is hosted. No adapter, functions, or host-specific form feature needed.
Add a small script that intercepts submit and POSTs the FormData with fetch, then swap in your success state. A configurable redirect for native form posts is coming with the launch.
Yes. It's your markup in your page, so scoped <style> blocks, Tailwind classes, or global CSS all apply as usual. mailcontact only cares about the field names: email and message are required, name and subject are optional.
related
Forms and a real email address, together, with notifications where you live. Launching soon. Be the first to know.