integrations · hosting platform

A contact form on GitHub Pages, without leaving GitHub Pages.

GitHub Pages serves static files only (no functions, no API routes, no server-side anything), so a contact form can't be handled on the site itself. The fix is a form that posts to an external endpoint: point plain HTML at your mailcontact form URL and submissions land in your project's inbox, with a ping in Discord, Slack, or email.

There's nothing to install and nothing to build. The snippet below works in a hand-written index.html, a Jekyll layout or include, or any static site you push to a gh-pages branch. Commit, push, done.

You also get a real inbound email address (yourproject@mailcontact.app) alongside the form, useful when you don't want to publish your personal email in a public repo.

the snippet

A working form for GitHub Pages, in one paste.

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.

index.html
<form action="https://mailcontact.app/api/forms/your-form-id" method="POST">
  <input type="text" name="name" placeholder="Your name" />
  <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

Three steps, start to finish.

01

Create an inbox

One inbox per project. Name it after your repo and you get a form endpoint and a project email address immediately.

02

Commit the form

Paste the snippet into index.html, a Jekyll include, or wherever your contact section lives. Push to your Pages branch as usual.

03

Get notified

Add a Discord, Slack, email, or webhook channel. Every submission pings you where you already are.

why mailcontact

Built to pair well with GitHub Pages.

Works within Pages' limits

GitHub Pages will never run your backend code, and with mailcontact it doesn't need to. The form posts to mailcontact's servers; your repo stays 100% static files.

No email address in your public repo

A mailto: link exposes your address to every scraper reading your source. A form endpoint and a yourproject@mailcontact.app address keep your personal email out of the repo entirely.

One inbox per repo you publish

Docs site, portfolio, project page: each GitHub Pages site gets its own inbox and its own address, instead of everything piling into your personal email.

faq

GitHub Pages + mailcontact, answered

Can GitHub Pages handle form submissions on its own?

No. GitHub Pages serves static files and runs no server code, so it can't process a POST. Forms on a Pages site must submit to an external endpoint like mailcontact.

Does this work with Jekyll on GitHub Pages?

Yes. The snippet is plain HTML, so it works in a Jekyll layout, an include, or a Markdown page with inline HTML. GitHub's Jekyll build doesn't touch it.

How do I show a success message after someone submits?

Submit with a few lines of fetch in a JS handler to keep the visitor on your page and show an inline thank-you. The endpoint has open CORS, so it works from any github.io or custom domain. A configurable redirect for native form posts is coming with the launch.

Can I style the form to match my site?

Completely. It's your markup. mailcontact only provides the endpoint. Use your existing CSS, your Jekyll theme's classes, or anything else; there's no widget or iframe.

related

Also works with

One inbox for every GitHub Pages project you ship.

Forms and a real email address, together, with notifications where you live. Launching soon. Be the first to know.

No spam. It's kind of our thing.