Formularz HTML, który wysyła na maila
Formgong team ·
Formularz HTML sam nie wyśle maila. Ustaw action na backend formularza i method POST, a przeglądarka wyśle pola. Formgong zapisuje zgłoszenie w UE i od razu pisze na Telegram. W planie darmowym też dostajesz mail na każde zgłoszenie.
Skopiuj ten formularz 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>
Zostań na stronie: te same pola przez 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 ? "Wysłano. Dziękujemy!" : "Nie udało się wysłać. Spróbuj ponownie.");
if (result.success) form.reset();
} catch {
status.textContent = "Brak połączenia. Spróbuj ponownie.";
}
});
</script>Jak działają formularze w HTML
HTML tylko pakuje pola. Nie otwiera skrzynki i nie uruchamia kodu poczty. Atrybut action to adres, który przyjmuje POST. Backend formularza jest tym adresem, więc statyczna strona wysyła maila bez PHP.
Link mailto otwiera pocztę gościa i wiele telefonów nic nie wysyła. PHP mail potrzebuje hostingu, który sam utrzymujesz, a taka poczta często wpada w spam. Adres w chmurze zostawia stronę zwykłym plikiem.
Konfiguracja w HTML
- Utwórz formularz w Formgong i skopiuj klucz. Klucz jest publiczny i ma być w stronie.
- Wklej formularz powyżej i podmień klucz. Każdemu polu daj atrybut name, inaczej przeglądarka go nie wyśle.
- Ustaw ukryte pole języka na język strony, żeby błędy i podziękowanie pasowały do witryny.
- Opcjonalnie dodaj ukryte pole przekierowania z pełnym adresem https własnej strony podziękowania. Adres musi być na Twojej witrynie.
- Wgraj plik i wyślij test z prawdziwego adresu. Potem podłącz Telegram w ustawieniach, jeśli chcesz sygnał na telefon.
mailto, PHP, Formspree, Web3Forms czy Formgong
| Opcja | Twój serwer | Co dostajesz |
|---|---|---|
| mailto: | Brak. Otwiera się poczta gościa. | Wiadomość tylko jeśli ktoś naciśnie wyślij. Wiele telefonów nic nie robi. Twój adres widać. |
| PHP mail() | Twój hosting PHP i jego poczta. | Mail z tego hostingu. Często wpada w spam, a skrypt utrzymujesz sam. |
| Formspree | Brak. Formularz wysyła do Formspree. | Poczta i panel. Za darmo 50 zgłoszeń miesięcznie. Personal kosztuje 15 dolarów miesięcznie. |
| Web3Forms | Brak. Publiczny klucz w formularzu. | Mail z ich adresu. Strona cen nie wczytała się 2026-10-06, więc nie podajemy ceny. |
| Formgong | Brak. Formularz wysyła do Formgong. | Telegram i mail od razu, także w Free. 250 zgłoszeń miesięcznie, dane w UE. |
Ceny Formspree pochodzą z formspree.io/plans z 2026-10-06. Limity Formgong pochodzą z kodu produktu. Web3Forms.com tego dnia zwrócił HTTP 403, więc wiersz tylko nazywa sposób.
Cennik · Formgong vs Formspree
Gotowy starter na GitHubie: github.com/formgong/html-starter. Licencja MIT: kliknij „Use this template” albo skopiuj pliki.
Nowy projekt jedną komendą: npm create formgong@latest -- --template html (npm: create-formgong)
Dodaj do istniejącego projektu: npx formgong init (npm: formgong)
Która opcja ma wysłać maila?
Użyj zwykłego HTML, gdy strona może się zmienić po wysłaniu. Działa bez JavaScript, w starych przeglądarkach i na każdym hostingu statycznym.
Użyj fetch, gdy gość ma zostać na stronie. Skrypt jest pod formularzem. Otwieraj go tylko wtedy, gdy jest potrzebny.
Zostaw PHP tylko wtedy, gdy formularz musi pisać do Twojej bazy. Przy formularzu kontaktowym adres w chmurze jest prostszy.
Pytania i odpowiedzi
Czy formularz HTML sam wyśle e-mail?
Nie. HTML tylko pakuje pola. Poczta, PHP albo backend formularza muszą je przyjąć i wysłać maila. Link mailto otwiera pocztę gościa i często zawodzi.
Jak wysłać formularz HTML na maila bez PHP?
Wklej formularz z tej strony i dodaj klucz. Przeglądarka wysyła dane do Formgong. Nie instalujesz PHP ani SMTP. Mail i Telegram przychodzą od razu, także w Free.
Co jest złego w formularzu mailto?
Gość musi mieć program pocztowy i widzi Twój adres. Wiele telefonów nic nie robi po stuknięciu. Nie ma zapisanej kopii ani filtra spamu.
Gdzie trafia gość po wysłaniu formularza?
Na stronę podziękowania w swoim języku albo na Twoją stronę, jeśli ustawisz przekierowanie. Adres musi być na Twojej witrynie. Błąd może mieć osobną stronę.
Czy darmowy plan mailuje każde zgłoszenie?
Tak. Free od razu wysyła mail o każdym zgłoszeniu na maksymalnie 3 adresy. Każde zgłoszenie zostaje też w skrzynce, a Telegram może napisać od razu. Pro dodaje więcej adresów (do 5).
Artykuły na ten temat
- Formularz HTML na statycznej stronie, bez własnego serwera
- Formularz mailto czy backend formularzy?
- Turnstile, reCAPTCHA czy hCaptcha do formularza
- Zgłoszenia ze strony w Telegramie: czat prywatny lub grupa
Kreatory stron i sklepy
Powiązane strony
Poradniki dla Twojej platformy
- Gotowy formularz kontaktowy HTML
- Formularz kontaktowy w WebWave
- Formgong dla agencji
- Formularz strony statycznej
- Formularz kontaktowy a RODO: wzór klauzuli
- Alternatywy Web3Forms
- Alternatywy dla EmailJS
- Formspree czy Web3Forms
- Darmowe backendy form
- Prompty dla narzędzi AI
- Sprawdzarka formularzy
- Pliki reguł dla agentów
- Narzędzia