メールを送るHTMLお問い合わせフォーム
Formgong team ·
HTMLのお問い合わせフォームだけではメールは送れません。actionをフォームの受け口に、methodをPOSTにします。ブラウザが項目を送ります。Formgongは内容をEUに保存し、Telegramへすぐ知らせます。無料プランでも、メールは1件ごとに届きます。
このHTMLフォームをコピー
<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>
ページに残す: 同じ項目をfetchで送る
<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 ? "送信しました。ありがとうございます。" : "送信できませんでした。もう一度お試しください。");
if (result.success) form.reset();
} catch {
status.textContent = "接続できませんでした。もう一度お試しください。";
}
});
</script>HTMLでのフォームの仕組み
HTMLは項目をまとめるだけです。メール箱を開かず、送信プログラムも動きません。actionはPOSTを受け取る住所です。フォームの受け口がその住所なので、静的なページでもPHPなしでメールを送れます。
mailtoは相手のメールアプリを開きますが、多くの電話では送られません。PHP mailは自分で動かすサーバが必要で、そのメールは迷惑メールになりやすいです。受け口を預ければ、ページはファイルのままです。
HTMLでの設定手順
- Formgongでフォームを作り、鍵をコピーします。鍵は公開してよく、ページに置きます。
- 上のフォームを貼り、鍵を置き換えます。各項目にnameを付けないと、ブラウザは送りません。
- 隠した言語の項目をページの言語にします。エラーと礼のページがサイトに揃います。
- 任意です。礼のページの完全なhttps住所を、隠した転送項目に入れます。その住所は自分のサイトに限られます。
- ファイルを置き、公開アドレスから試験を送ります。電話に知らせたいときは設定でTelegramをつなぎます。
mailto、PHP、Formspree、Web3Forms、Formgong
| 方法 | 自分で動かすサーバ | 届くもの |
|---|---|---|
| mailto: | なし。相手のメールアプリが開きます。 | 相手が送ったときだけ届きます。多くの電話は何もしません。住所が見えます。 |
| PHP mail() | 自分のPHPサーバとそのメール。 | そのサーバからのメールです。迷惑メールになりやすく、スクリプトは自分で守ります。 |
| Formspree | なし。フォームはFormspreeへ送ります。 | メールと画面です。無料は月50件です。Personalは月15ドルです。 |
| Web3Forms | なし。フォームに公開鍵を置きます。 | 相手の受け口からのメールです。料金ページは2026-10-06に開かなかったので、料金は書きません。 |
| Formgong | なし。フォームはFormgongへ送ります。 | TelegramもメールもFreeですぐ届きます。月250件で、データはEUです。 |
Formspreeの料金は2026-10-06のformspree.io/plansです。Formgongの上限は製品のコードです。Web3Forms.comはその日HTTP 403でした。この行はやり方の名前だけです。
すぐ使えるスターター(GitHub): github.com/formgong/html-starter. MIT ライセンス:「Use this template」をクリックするか、ファイルをコピーしてください。
1 コマンドで新規プロジェクト: npm create formgong@latest -- --template html (npm: create-formgong)
既存のプロジェクトに追加: npx formgong init (npm: formgong)
どの方法でメールを送りますか
送信後にページが変わってよいなら、素のHTMLを使います。JavaScriptがオフでも、古いブラウザでも、静的な置き場でも動きます。
相手をページに残すならfetchを使います。スクリプトはフォームの下にあります。必要なときだけ開きます。
自分のデータベースへ書く必要があるときだけPHPを残します。問い合わせなら、預ける受け口の方が手間は少ないです。
よくある質問
HTMLの問い合わせフォームだけでメールは送れますか
送れません。HTMLは項目をまとめるだけです。メール箱、PHP、または受け口が受け取って送ります。mailtoは相手のアプリを開き、失敗しやすいです。
PHPなしでHTMLフォームをメールへ送るには
このページのフォームを貼り、鍵を入れます。ブラウザがFormgongへ送ります。PHPもSMTPも置きません。FreeでもメールとTelegramはすぐ届きます。
mailtoフォームの欠点は何ですか
相手にメールアプリが必要で、あなたの住所が見えます。多くの電話は送信を押しても何もしません。控えも迷惑メール対策もありません。
送信のあと相手はどこへ行きますか
相手の言語の礼のページか、転送を入れた自分のページです。住所は自分のサイトに限られます。失敗は別ページにもできます。
無料プランは1件ごとにメールしますか
します。Freeは1件ごとに、最大3つの住所へすぐメールします。各件は受信箱にも残り、Telegramはすぐ書けます。Proは宛先を増やせます(5つまで)。