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.
| Approach | Static hosts | Delivers reliably | Spam protection | Upkeep |
|---|---|---|---|---|
mailto: link | Yes | No, opens the visitor’s mail app | None | Exposes your address |
PHP mail() script | No, needs PHP | Can land in spam | You build it | Server and patches |
| Google Apps Script | Yes | Daily quota limits | You build it | Script and quotas |
| Form endpoint | Yes | Yes, authenticated sending | Built in | None |
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.
<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
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
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
Verify your email once
Click the verification link so notifications can be delivered. Submissions received before verification are still stored, never dropped.
- 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.
<!-- 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
| Symptom | What’s happening | Fix |
|---|---|---|
| mailto: opens a draft | You 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 arrives | The 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 spam | The 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
Last reviewed by the MakeTheForm team.