HTML contact form that sends email
Formgong team ·
An HTML contact form cannot send email by itself. Point the action at a form backend with method POST, and the browser sends the fields. Formgong stores the lead in the EU and pings Telegram at once. On the free plan, you also get an email for every lead.
Copy this HTML form
<form action="https://formgong.com/submit" method="POST"> <input type="hidden" name="access_key" value="fk_your_access_key"> <input type="hidden" name="_lang" value="en"> <label>Name <input type="text" name="name" autocomplete="name" placeholder="Your name" required></label> <label>Email <input type="email" name="email" autocomplete="email" placeholder="you@example.com" required></label> <label>Message <textarea name="message" placeholder="How can we help?" required></textarea></label> <div aria-hidden="true" style="position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)"> <label>Leave this field empty<input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label> </div> <button type="submit">Send</button> </form>
<form action="https://formgong.com/submit" method="POST"> <input type="hidden" name="access_key" value="fk_your_access_key"> <input type="hidden" name="_lang" value="uk"> <label>Ім’я <input type="text" name="name" autocomplete="name" placeholder="Ваше ім’я" required></label> <label>Email <input type="email" name="email" autocomplete="email" placeholder="you@example.com" required></label> <label>Повідомлення <textarea name="message" placeholder="Чим ми можемо допомогти?" required></textarea></label> <div aria-hidden="true" style="position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)"> <label>Залиште це поле порожнім<input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label> </div> <button type="submit">Надіслати</button> </form>
<form action="https://formgong.com/submit" method="POST"> <input type="hidden" name="access_key" value="fk_your_access_key"> <input type="hidden" name="_lang" value="pl"> <label>Imię <input type="text" name="name" autocomplete="name" placeholder="Twoje imię" required></label> <label>E-mail <input type="email" name="email" autocomplete="email" placeholder="ty@example.com" required></label> <label>Wiadomość <textarea name="message" placeholder="W czym możemy pomóc?" required></textarea></label> <div aria-hidden="true" style="position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)"> <label>Pozostaw to pole puste<input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label> </div> <button type="submit">Wyślij</button> </form>
<form action="https://formgong.com/submit" method="POST"> <input type="hidden" name="access_key" value="fk_your_access_key"> <input type="hidden" name="_lang" value="tr"> <label>Ad <input type="text" name="name" autocomplete="name" placeholder="Adınız" required></label> <label>E-posta <input type="email" name="email" autocomplete="email" placeholder="siz@ornek.com" required></label> <label>Mesaj <textarea name="message" placeholder="Size nasıl yardımcı olabiliriz?" required></textarea></label> <div aria-hidden="true" style="position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)"> <label>Bu alanı boş bırakın<input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label> </div> <button type="submit">Gönder</button> </form>
<form action="https://formgong.com/submit" method="POST"> <input type="hidden" name="access_key" value="fk_your_access_key"> <input type="hidden" name="_lang" value="es"> <label>Nombre <input type="text" name="name" autocomplete="name" placeholder="Tu nombre" required></label> <label>Correo electrónico <input type="email" name="email" autocomplete="email" placeholder="tu@ejemplo.com" required></label> <label>Mensaje <textarea name="message" placeholder="¿En qué podemos ayudarte?" required></textarea></label> <div aria-hidden="true" style="position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)"> <label>Deja este campo vacío<input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label> </div> <button type="submit">Enviar</button> </form>
<form action="https://formgong.com/submit" method="POST"> <input type="hidden" name="access_key" value="fk_your_access_key"> <input type="hidden" name="_lang" value="fr"> <label>Nom <input type="text" name="name" autocomplete="name" placeholder="Votre nom" required></label> <label>E-mail <input type="email" name="email" autocomplete="email" placeholder="vous@exemple.com" required></label> <label>Message <textarea name="message" placeholder="Comment pouvons-nous vous aider ?" required></textarea></label> <div aria-hidden="true" style="position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)"> <label>Laissez ce champ vide<input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label> </div> <button type="submit">Envoyer</button> </form>
<form action="https://formgong.com/submit" method="POST"> <input type="hidden" name="access_key" value="fk_your_access_key"> <input type="hidden" name="_lang" value="pt"> <label>Nome <input type="text" name="name" autocomplete="name" placeholder="O seu nome" required></label> <label>E-mail <input type="email" name="email" autocomplete="email" placeholder="voce@exemplo.com" required></label> <label>Mensagem <textarea name="message" placeholder="Como podemos ajudar?" required></textarea></label> <div aria-hidden="true" style="position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)"> <label>Deixe este campo vazio<input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label> </div> <button type="submit">Enviar</button> </form>
<form action="https://formgong.com/submit" method="POST"> <input type="hidden" name="access_key" value="fk_your_access_key"> <input type="hidden" name="_lang" value="ar"> <label>الاسم <input type="text" name="name" autocomplete="name" placeholder="اسمك" required></label> <label>البريد الإلكتروني <input type="email" name="email" autocomplete="email" placeholder="you@example.com" required></label> <label>الرسالة <textarea name="message" placeholder="كيف يمكننا مساعدتك؟" required></textarea></label> <div aria-hidden="true" style="position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)"> <label>اترك هذا الحقل فارغًا<input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label> </div> <button type="submit">إرسال</button> </form>
<form action="https://formgong.com/submit" method="POST"> <input type="hidden" name="access_key" value="fk_your_access_key"> <input type="hidden" name="_lang" value="he"> <label>שם <input type="text" name="name" autocomplete="name" placeholder="השם שלך" required></label> <label>אימייל <input type="email" name="email" autocomplete="email" placeholder="you@example.com" required></label> <label>הודעה <textarea name="message" placeholder="איך נוכל לעזור?" required></textarea></label> <div aria-hidden="true" style="position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)"> <label>השאירו שדה זה ריק<input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label> </div> <button type="submit">שליחה</button> </form>
<form action="https://formgong.com/submit" method="POST"> <input type="hidden" name="access_key" value="fk_your_access_key"> <input type="hidden" name="_lang" value="hi"> <label>नाम <input type="text" name="name" autocomplete="name" placeholder="आपका नाम" required></label> <label>ईमेल <input type="email" name="email" autocomplete="email" placeholder="you@example.com" required></label> <label>संदेश <textarea name="message" placeholder="हम आपकी कैसे मदद कर सकते हैं?" required></textarea></label> <div aria-hidden="true" style="position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)"> <label>इस फ़ील्ड को खाली छोड़ें<input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label> </div> <button type="submit">भेजें</button> </form>
<form action="https://formgong.com/submit" method="POST"> <input type="hidden" name="access_key" value="fk_your_access_key"> <input type="hidden" name="_lang" value="ja"> <label>お名前 <input type="text" name="name" autocomplete="name" placeholder="山田 太郎" required></label> <label>メールアドレス <input type="email" name="email" autocomplete="email" placeholder="you@example.com" required></label> <label>メッセージ <textarea name="message" placeholder="ご用件をご記入ください" required></textarea></label> <div aria-hidden="true" style="position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)"> <label>この欄は空のままにしてください<input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label> </div> <button type="submit">送信</button> </form>
<form action="https://formgong.com/submit" method="POST"> <input type="hidden" name="access_key" value="fk_your_access_key"> <input type="hidden" name="_lang" value="de"> <label>Name <input type="text" name="name" autocomplete="name" placeholder="Ihr Name" required></label> <label>E-Mail <input type="email" name="email" autocomplete="email" placeholder="name@beispiel.de" required></label> <label>Nachricht <textarea name="message" placeholder="Wie können wir Ihnen helfen?" required></textarea></label> <div aria-hidden="true" style="position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)"> <label>Lassen Sie dieses Feld leer<input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label> </div> <button type="submit">Senden</button> </form>
Stay on the page with fetch
This script posts the same fields and keeps the visitor on the page. The form above still works if JavaScript is off.
<script>
// The form above posts to https://formgong.com/submit. This script stays on the page instead.
const form = document.querySelector("form[action$='/submit']");
form.addEventListener("submit", async (event) => {
event.preventDefault();
let status = form.querySelector("[role=status]");
if (!status) {
status = document.createElement("p");
status.setAttribute("role", "status");
form.append(status);
}
try {
const response = await fetch(form.action, {
method: "POST",
headers: { Accept: "application/json" },
body: new FormData(form),
});
const result = await response.json();
status.textContent = result.message || (result.success ? "Sent. Thank you!" : "Could not send. Please try again.");
if (result.success) form.reset();
} catch {
status.textContent = "Connection failed. Please try again.";
}
});
</script>Why mailto: and PHP mail() don't work
A mailto link opens the visitor's own mail app. Many phones have no app set up, so Send does nothing.
The visitor must send a second time. If they do not, you get no saved copy. Your address sits in the page. There is no spam filter and no inbox.
PHP mail() needs a PHP host and a working mail setup. Mail from a shared host often lands in spam, because that server is not a trusted sender.
You also keep the script and its headers. A static host cannot run PHP at all.
Will the email arrive?
Formgong sends from noreply@formgong.com. You do not add SPF or DKIM records. Formgong's mail providers authenticate that sending domain.
There is no custom From address on your own domain yet.
On the free plan, each submission is emailed right away to up to 3 addresses, for forms with email notifications on.
Telegram is immediate on every plan, including Free. Free emails up to 3 verified recipients, Pro up to 5.
If a message is missing, open the Formgong inbox first. The lead is stored there either way. Then check the spam folder and allow noreply@formgong.com.
A lead scored as spam is not emailed and is not sent to Telegram.
Reply on a submission email goes to the visitor when the form has an email field, on every plan.
The Telegram message has a Reply button when the visitor left an email.
How forms work in HTML
HTML only packs the fields. It does not open a mailbox or run mail code. The action attribute is the address that receives the POST. A form backend is that address, so a static page can send email without PHP.
A mailto link opens the visitor's mail app, and many phones never send the message. PHP mail needs a host that you keep running, and that mail often lands in spam. A hosted endpoint leaves the page as a file you can upload anywhere.
Set it up in HTML
- Create a form in Formgong and copy the access key. The key is public and belongs in the page.
- Paste the form above. Replace the key. Give every field a name attribute, or the browser will not send it.
- Set the hidden language field to your page language, so errors and the thank-you page match the site.
- Optional: add a hidden redirect field with the full https URL of your own thank-you page. That URL must be on your site.
- Upload the file and send a test from the live address. Then connect Telegram in the form settings if you want a phone alert.
mailto, PHP, Formspree, Web3Forms, or Formgong
| Option | Server you run | What you get |
|---|---|---|
| mailto: | None. The visitor's mail app opens. | A message only if they press send. Many phones do nothing. Your address is visible. |
| PHP mail() | Your PHP host and its mail setup. | Email from that host. It often lands in spam, and you maintain the script. |
| Formspree | None. The form posts to Formspree. | Email and a dashboard. Free is 50 submissions a month. Personal is 15 dollars a month. |
| Web3Forms | None. A public key in the form. | Email from their endpoint. Their pricing page did not load on 6 Oct 2026, so this row gives no price. |
| Formgong | None. The form posts to Formgong. | Telegram and email at once, on Free too. 250 submissions a month, stored in the EU. |
Formspree prices come from formspree.io/plans on 6 Oct 2026. Formgong limits come from the product code. Web3Forms.com returned HTTP 403 the same day, so that row names the pattern only.
Pricing · Formgong vs Formspree · AI form generator · Tailwind form generator · Bootstrap form generator · Booking form generator · Order form generator · Registration form generator · Contact form generator · HTML form generator · HTML form builder
Ready starter on GitHub: github.com/formgong/html-starter. MIT license: click “Use this template” or copy the files.
New project in one command: npm create formgong@latest -- --template html (npm: create-formgong)
Add to an existing project: npx formgong init (npm: formgong)
Which option should send the mail?
Use a plain HTML form when the page can change after submit. It works with JavaScript off, on old browsers, and on any static host.
Use fetch when the visitor must stay on the page. The script is on this page, under the HTML form. It posts the same fields and shows the reply.
Keep PHP only when the form must write to your own database. For a contact form, a hosted endpoint is less to maintain.
Questions and answers
Can an HTML contact form send email by itself?
No. HTML only packs the fields. A mailbox, PHP, or a form backend has to accept them and send the mail. A mailto link opens the visitor's mail app, and it often fails.
How do I send an HTML form to email without PHP?
Paste the form on this page and add your access key. The browser posts to Formgong. You do not install PHP or SMTP. Email and Telegram arrive at once, on Free too.
What is wrong with a mailto contact form?
The visitor must have a mail app, and they see your address. Many phones do nothing when they tap send. You get no saved copy and no spam filter.
Where does the visitor go after they send the form?
To a thank-you page in their language, or to your own page if you set a redirect. The redirect URL must be on your site. Errors can use a separate error page.
Does the free plan email me for every lead?
Yes. Free emails each lead right away to up to 3 addresses. Each lead is also in the inbox, and Telegram can ping you at once. Pro adds more recipients (up to 5).
Articles on this topic
- Form without a backend: 7 ways that work
- HTML contact form without a backend: a working example
- Thank-you page after form submission (HTML)
- HTML form action attribute explained
- Web3Forms alternatives compared
Site builders and shops
Related pages
Guides
- Formgong for agencies
- Static website contact form
- Netlify Forms alternative
- GDPR-compliant contact form
- Formspree alternatives
- Formcarry alternatives
- Formspark alternatives
- Splitforms alternatives
- Formgrid alternatives
- FormBackend alternatives
- Formbold alternatives
- Formester alternatives
- HeroTofu alternatives
- KwesForms alternatives
- Sheet Monkey alternatives
- Slapform alternatives
- Static Forms alternatives
- ShipMyForm alternatives
- Contact Form 7 alternatives
- WPForms alternatives
- Zapier Forms alternatives
- Forminit alternatives
- Fillout alternatives
- Formstack alternatives
- Microsoft Forms alternatives
- Paperform alternatives
- Freedback alternatives
- Pageclip alternatives
- EmbedSocial alternative
- Trustindex alternative
- Senja alternative
- Shapo alternative
- Junip alternative
- Famewall alternative
- FormKeep alternatives
- Jotform alternatives
- Basin alternatives
- Getform alternatives
- FormSubmit alternatives
- Typeform alternatives
- Tally alternatives
- Wufoo alternatives
- Google Forms alternatives
- Formgong alternatives
- Formsite alternatives
- Form for photographers
- Form for restaurants
- Form for clinics
- Form for real estate
- Form for lawyers
- Best form backend services
- Form endpoint services tested
- Contact form APIs tested
- Web3Forms alternatives
- EmailJS alternatives
- Formspree vs Web3Forms
- Formspree vs EmailJS
- Formspree vs Getform (Forminit)
- Formspree vs Basin
- Formspree vs FormSubmit
- Web3Forms vs Netlify Forms
- Netlify Forms vs Formspree
- Jotform vs Typeform
- Judge.me vs Yotpo
- Judge.me vs CusRev: the WooCommerce question
- Best free form backends
- Free website templates
- Testimonial and rating widget
- Judge.me alternative
- Yotpo alternative
- Loox alternative
- Stamped alternative
- Okendo alternative
- Fera alternative
- CusRev alternative
- Trustpilot alternative
- Testimonial.to alternative
- Elfsight alternative
- Trustmary alternative
- Boast alternative
- REVIEWS.io alternative
- Endorsal alternative
- AI builder prompts
- Form checker
- AI form generator
- Form builder
- Tailwind form generator
- Bootstrap form generator
- Booking form generator
- Order form generator
- Registration form generator
- Contact form generator
- HTML form generator
- HTML form builder
- Survey form generator
- Feedback form generator
- Newsletter signup form generator
- RSVP form generator
- Job application form generator
- Review schema generator
- Google review link generator
- Contact form examples
- HTML contact form code
- React contact form component
- Next.js contact form template
- Tailwind contact form template
- Shopify contact form Liquid
- Webflow contact form code
- Framer contact form component
- Astro contact form component
- Vue contact form component
- Ghost contact form
- WordPress contact page template
- Agent rules files
- Tools