# Send a website form to Gmail (and why mailto: fails)

> Get form submissions in Gmail without mailto: links, app passwords or Apps Script, then label them, keep them out of spam and reply from Gmail.

Published 2026-10-25 · https://ikiform.com/guides/send-form-to-email/gmail

Post the form to a form backend and add your Gmail address as the recipient; don't use a `mailto:` action, which only opens the visitor's mail app. Then add a Gmail filter for the sender so submissions skip spam and get their own label. Pressing **Reply** in Gmail writes to the visitor, from your own address.

## What's different here

Gmail is a mailbox, not a sending service for your site. It has no URL a form can post to, so every route to Gmail goes through something else. The first thing most people try is `mailto:`:

`The form that seems to work`:

```html
<form action="mailto:you@gmail.com" method="post" enctype="text/plain">
  <input name="name" />
  <input name="email" type="email" />
  <textarea name="message"></textarea>
  <button>Send</button>
</form>
```

It does work, on your machine. You press **Send**, your mail app opens with the fields in the body, and you send it to yourself. A visitor's experience is different:

Diagram: What a mailto: form does on a visitor's device

1. The visitor presses Send. The browser doesn't post the form anywhere; it hands a mailto: link to the operating system.
2. If no mail app or web handler is set up, which is common on work laptops and for Gmail users in the browser, nothing visible happens or the system asks which app to use.
3. If one is set up, a draft opens in the visitor's own mail app with the fields pasted into the body.
4. The visitor has to press Send a second time, from their own account. Many close the draft instead, and you never learn they tried.

Every step after the first happens on the visitor's device, so you can't see where people drop off.

When a message does get through, the body is raw `name=value` lines, because that's what `text/plain` encoding produces:

`What arrives`:

```text
name=Ada Lovelace
email=ada@example.com
message=Hi, do you take on small bathroom jobs in March?
```

The other routes to Gmail work, but each needs a server you run:

| Route | What it needs | Catch |
| --- | --- | --- |
| Gmail SMTP with an app password | A server that runs code, and 2-Step Verification on the Google account | The password can send as you from anywhere, so it must never reach the browser. Google also limits how much a personal account sends a day |
| Google Apps Script with `MailApp` | A script deployed as a web app | Personal accounts can email 100 recipients a day from scripts. The URL is public with no spam protection, so one bot can use it up |
| A form backend | The backend's URL in `action` | The email comes from the service's address, not yours. Reply-to fixes the part that matters |

Apps Script deserves a closer look, because it's the route most tutorials suggest. You write a `doPost` function, deploy it as a web app that anyone can call, and point the form at its URL. It works, but a plain form post leaves the visitor on a page served from Google's domain rather than yours, every bot that finds the URL can use up the day's quota, and the script runs as you, so a bug in it can email anyone from your account. You also own every change to the form's fields from then on.

## Send the form to Gmail

Here's a form for a small trade business. The `job` field makes the inbox easy to scan, and `email` is named so replies go to the visitor:

`contact.html`:

```html
<form action="https://ikiform.com/f/frm_xxxxxxxxxxxxxxxx" method="post">
  <label for="name">Your name</label>
  <input id="name" name="name" autocomplete="name" required />

  <label for="email">Email for our reply</label>
  <input id="email" name="email" type="email" autocomplete="email" required />

  <label for="job">What do you need?</label>
  <select id="job" name="job" required>
    <option value="">Choose one</option>
    <option value="repair">A repair</option>
    <option value="quote">A quote for a new job</option>
    <option value="other">Something else</option>
  </select>

  <label for="message">Details</label>
  <textarea id="message" name="message" rows="5" required></textarea>

  <input name="_gotcha" type="text" tabindex="-1" autocomplete="off" hidden />
  <button>Send to our inbox</button>
</form>
```

1. Create a form in Ikiform and replace `frm_xxxxxxxxxxxxxxxx` with its id.
2. If you signed up with your Gmail address, you already get the emails as the workspace owner. Otherwise open the form's **Notifications** settings, enter the Gmail address under **Add someone outside the workspace** and press **Send link**.
3. Open the confirmation email in Gmail and confirm. Until then the address shows **Waiting for confirmation** and gets nothing.
4. Add your domain under the form's **Allowed domains**, publish the page and send a test.

## Keep it out of spam with a Gmail filter

The first email from a new sender can land in **Spam** or **Promotions**. A filter on the sender fixes that for good. In Gmail, open the search options, put `notifications@ikiform.com` in **From**, press **Create filter**, then tick **Never send it to Spam**, **Apply the label**, **Always mark it as important** and **Categorize as: Primary**, which keeps it out of **Promotions**.

Or import the filter. This is the format Gmail's own filter **Export** writes; Google doesn't document it separately, so if an import fails, create the filter by hand as above. Save it as `mailFilters.xml`, then go to **Settings**, **See all settings**, **Filters and Blocked Addresses**, **Import filters**:

`mailFilters.xml`:

```text
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:apps="http://schemas.google.com/apps/2006">
  <title>Mail Filters</title>
  <entry>
    <category term="filter"></category>
    <title>Mail Filter</title>
    <content></content>
    <apps:property name="from" value="notifications@ikiform.com"/>
    <apps:property name="label" value="Website"/>
    <apps:property name="shouldNeverSpam" value="true"/>
    <apps:property name="shouldAlwaysMarkAsImportant" value="true"/>
    <apps:property name="smartLabelToApply" value="^smartlabel_personal"/>
  </entry>
</feed>
```

Create the **Website** label first, or rename it in the file. One filter covers every form, because all notifications come from the same address. To split forms into different labels, filter on the subject instead, such as `subject:("New submission: Quote request")`.

> Gmail ignores dots and anything after a plus sign in the part before the @. Adding `you+site@gmail.com` as the recipient delivers to your normal inbox, and a filter on **To** can then tell site mail from everything else. It counts as an outside address, so it confirms by link like any other.

## Replying from Gmail

Gmail honours the reply-to header, so **Reply** addresses the visitor. Your answer goes out from your Gmail address, with Ikiform nowhere in the thread.

- To answer from your business address instead, add it under **Settings**, **Accounts and Import**, **Send mail as**, and pick it in the **From** line when you reply.
- Gmail may group notifications with the same subject into one conversation, because the subject is always `New submission:` and the form's name. Turn off **Conversation view** in Gmail's settings if you'd rather see one row per message.
- Hourly digests have no reply-to, since they cover many visitors. Reply to those from the dashboard's links.

## Check it works

1. Fill in the form on your page and submit it. You land on your thank-you page, or Ikiform's hosted one.
2. Find the email in Gmail. It has your label and isn't in **Spam** or **Promotions**.
3. Press **Reply**. The **To** line is the address typed in the form.
4. Post with the honeypot filled in, `_gotcha=bot`. It still gets a success answer, but the submission is stored as spam and sends no email or webhook.
5. Nothing arrived? Switch the dashboard's status filter to **Spam**. Spam gets the same success answer as a real submission.

## Gotchas

- **Google Workspace aliases.** If the recipient is an alias or a Google Group, the group's own settings decide whether outside senders are allowed. Send a test before you rely on it.
- **Confirmation goes to spam.** The confirmation link email comes from Ikiform too. If it doesn't show up, look in **Spam** and mark it as not spam.
- **Several Gmail addresses.** Each form emails up to 10 addresses in all, and each outside address confirms separately.
- **Old mailto: links elsewhere.** A `mailto:` link in your footer is fine as a link. The problem is only `mailto:` as a form's `action`.

## Questions

### Can I send form submissions to a Google Workspace address?

Yes. A Workspace address works like any other recipient. If it's a Google Group or an alias, check that the group accepts mail from outside senders, then send a test.

### Why does my mailto: form not send anything?

A mailto: action never sends. It asks the visitor's device to open a mail app with a draft. If none is set up, nothing visible happens, and if one is, the visitor still has to press Send in it.

### Can I use Gmail SMTP to send form emails?

Only from a server you run, with an app password on an account that has 2-Step Verification. Never put that password in browser code; it can send mail as you.

### How do I stop form emails going to Gmail spam?

Create a Gmail filter for mail from notifications@ikiform.com and tick Never send it to Spam. Apply a label at the same time, so form messages are easy to find.

### Can I reply from Gmail to the person who filled in the form?

Yes, when the form's email field is named email, email_address, your_email, reply_to, contact_email, or the form sends a _replyto field. Gmail then puts the visitor in the To line when you press Reply.

## More guides

- [Send a form to your email](https://ikiform.com/guides/send-form-to-email.md): Get every form submission in your inbox without a mail server: why mailto: and PHP mail() fail, and a setup that filters spam and lets you reply.
- [Reply from your inbox](https://ikiform.com/guides/send-form-to-email/reply-to.md): Make Reply on a form notification write to the person who filled in the form: which field names work, when to use _replyto, and why replies go astray.
- [Without PHP](https://ikiform.com/guides/send-form-to-email/without-php.md): Replace a contact.php script that calls mail() with a form that posts to a hosted endpoint, keeping your field names, your thank-you page and replies.
- [Multiple recipients](https://ikiform.com/guides/send-form-to-email/multiple-recipients.md): Email one form to your whole team, or route each message to the right person by topic, without letting the form itself pick who gets the mail.
- [EmailJS alternative](https://ikiform.com/guides/send-form-to-email/emailjs-alternative.md): Move a contact form off EmailJS: why browser-side email keys are a risk, what changes in your code, and what you give up, such as the auto-reply.
- [Next.js](https://ikiform.com/guides/send-form-to-email/nextjs.md): Two ways to email a Next.js form with a Server Action: send it yourself with Resend or Nodemailer, or forward it to a form backend, compared honestly.
