HTML form to email
How do I make an HTML contact form send to my email?
By the FormToMail team · Checked against official sources · Updated
HTML by itself can't send an email: a form only sends its fields to the URL in its action. To get submissions by email, set `action` to a form endpoint, use `method="POST"`, and give every input a `name`; the endpoint turns each submission into an email to you. No PHP or server needed.
A mailto: action opens the visitor's own mail app instead of sending anything, which is why it so often "does nothing". See mailto vs a contact form.
| Method | Needs a server? | Works for every visitor? | Notes |
|---|---|---|---|
Form endpoint in action | No | Yes | Copy-paste; spam filtering included |
action="mailto:you@site.com" | No | No | Opens the visitor's mail app, if they have one |
PHP mail() script | Yes (PHP hosting) | Yes | Static hosts can't run it; deliverability is on you |
| Your own serverless function | Serverless | Yes | You write validation, spam checks, email sending |
Copy-paste contact form
Replace the URL with your own endpoint (free, one email address).
<form action="https://getformtomail.com/f/YOUR_FORM_ID" method="POST">
<label>Name <input name="name" required></label>
<label>Email <input name="email" type="email" required></label>
<label>Message <textarea name="message" required></textarea></label>
<!-- honeypot: real people never see or fill it -->
<input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off">
<button type="submit">Send</button>
</form>Why each part matters
method="POST": a GET would put the message in the URL.nameon every field: fields without anameare not sent at all, the #1 reason for empty emails.type="email"+required: the browser checks the address before sending._gotcha: a hidden honeypot; bots fill it, people don't, so those submissions are marked spam.
Optional fields FormToMail understands
_subject: the email's subject line._next: the URL of your own thank-you page._replyto: which address "Reply" goes to (anemailfield is used automatically).
Quick answers
How do I send an HTML form to my email without PHP?
Use a form endpoint as the action. See HTML form to email without PHP.
Simple contact form HTML template free?
The code above is free to copy. A styled version is in simple contact form HTML template.
How do I get form submissions sent to Gmail?
Create the endpoint with your Gmail address. If the first one lands in spam, mark it "Not spam" so the rest go to your inbox.
How do I test a contact form without spamming myself?
Submit once or twice and check the dashboard instead of the inbox; duplicate submissions within an hour are flagged and not emailed.
What to do next
Get your endpoint URL, paste it into the action, and the next submission lands in your inbox.
Get your form endpointSources
Checked: . Prices, limits and features of other services change: confirm current values at the official links above. Product names belong to their owners; we are not affiliated with them.