Free plan250 submissions a month, spam filtering included, no card.See pricing →
Guide · HTML

Send an HTML form to email without running a server

People try mailto:, then a PHP mail() script, then Google Apps Script, and each has a catch. Below is the honest comparison, then the approach that works for any HTML contact form on any host, including static ones, followed by a complete, accessible example you can paste today.

4 min readWorks on any hostLast reviewed

On this page

Your options, compared

Four ways people try to get form submissions into their inbox. Only one works on a static host without code you have to maintain.

ApproachStatic hostsDelivers reliablySpam protectionUpkeep
mailto: linkYesNo, opens the visitor’s mail appNoneExposes your address
PHP mail() scriptNo, needs PHPCan land in spamYou build itServer and patches
Google Apps ScriptYesDaily quota limitsYou build itScript and quotas
Form endpointYesYes, authenticated sendingBuilt inNone

The minimal integration

This is the whole thing: a normal HTML form whose action points at your endpoint. No JavaScript required. The browser posts it and lands on a success page.

HTML
<form action="https://mtform.co/f/your-form-key" method="POST">
  <label>
    Name
    <input name="name" autocomplete="name" required>
  </label>

  <label>
    Email
    <input type="email" name="email" autocomplete="email" required>
  </label>

  <label>
    Message
    <textarea name="message" required></textarea>
  </label>

  <!-- Spam trap: hidden from people, tempting to bots. Leave it empty. -->
  <input
    type="text"
    name="_mtf_honeypot"
    tabindex="-1"
    autocomplete="off"
    aria-hidden="true"
    style="position:absolute;left:-9999px"
  >

  <button type="submit">Send</button>
</form>

Replace your existing <form> tag, or just change its action attribute. The browser lands on a hosted success page, or on your own page if you add a hidden _mtf_redirect field that points at one of the form’s allowed domains.

Step by step

  1. 1

    Create a form endpoint

    Sign up and create a form. You get a public endpoint URL (safe to put in client code) and a searchable inbox: no server to deploy.

  2. 2

    Point your form’s action at it

    Change your <form> tag’s action attribute to the endpoint and set method="POST". Keep your existing fields and markup.

  3. 3

    Verify your email once

    Click the verification link so notifications can be delivered. Submissions received before verification are still stored, never dropped.

  4. 4

    Submit and confirm

    Fill in the form. The submission arrives in your inbox and by email, with the sender in Reply-To so you can respond directly.

Why mailto: doesn’t work

The one-liner everyone tries first. It doesn’t send anything. It opens the visitor’s email client with a blank draft, loses the data if they don’t have one configured, and exposes your address to scrapers.

The mailto trick · don’t ship this
<!-- Looks like it emails you. It does not. -->
<form action="mailto:you@example.com" method="POST" enctype="text/plain">
  <input name="email" type="email">
  <textarea name="message"></textarea>
  <button>Send</button>
</form>

Common pitfalls

Using mailto: in production

mailto: depends on the visitor having a configured desktop mail client, sends nothing on most phones, and publishes your address for spam harvesters. It’s a demo, not a contact form.

Spoofing the sender in From

Never set the notification’s From to the submitter’s address. It fails SPF/DKIM and lands in spam. Put the submitter in Reply-To (a good endpoint does this for you) and send from an authenticated address.

Troubleshooting

SymptomWhat’s happeningFix
mailto: opens a draftYou used action="mailto:", the browser hands off to a mail client instead of sending.Switch the action to a real endpoint URL that receives the POST server-side.
no email arrivesThe recipient address hasn’t been verified, or the notification went to spam.Verify the recipient once; check the inbox (submissions are stored regardless) and your spam folder.
goes to spamThe message is failing authentication or the From is spoofed.Use an endpoint that sends from its own authenticated domain and maps the submitter to Reply-To.

Frequently asked questions

Why can’t an HTML form send email directly?

HTML only describes the form and where to POST it. Sending email requires a server that receives the submission and talks to a mail service (SMTP/API). Browsers deliberately can’t send mail, so you need either your own server or a hosted form endpoint that does it for you.

Is there an HTML tag to send an email from a form?

No. There is no HTML element that sends email. The closest, action="mailto:", just opens the visitor’s email app with a draft. It doesn’t deliver anything and often does nothing on mobile.

Can I send an HTML form to email without any backend code?

Yes. Point the form’s action at a hosted form endpoint. It receives the POST, filters spam, stores the submission, and emails it to you, so you write no server code and host nothing extra.

How do I make an HTML contact form send to my email?

Set the form’s action to a form endpoint URL and its method to POST, give every input a name, and verify your address once. Each submission is then emailed to you with the visitor’s address in Reply-To, so you can answer with a normal reply.

Can I send form data to email without PHP?

Yes. PHP’s mail() only works on a host that runs PHP, and its messages often land in spam. A hosted form endpoint does the receiving and the sending for you, so a plain HTML page on any host can submit to email with no PHP at all.

Does this work on a static site like GitHub Pages or Netlify?

Yes. Because the endpoint is external, static hosts that can’t run server code work fine: the form just POSTs to the endpoint’s URL.

Keep going

Ship this form for real.

Create an endpoint, paste it in and watch the first submission land in your inbox.

Create free endpoint