Contact form
Every WPTom template has a contact form (a quote form, an enquiry form or a pitch form, depending on the template). When a visitor sends it, the message arrives in your inbox as an email; press Reply and you answer the visitor directly.
Templates: all of them. Service: Resend sends the email.
Where the form is and where messages go
Section titled “Where the form is and where messages go”| Template | The form is on |
|---|---|
| Aurora | Demo page |
| Blaze | Plan page |
| Deckle | About page |
| Encore | Info page |
| Iris | Studio page |
| Quest, Swell | Support page |
| Stride | Race day page |
| Burin, Docket, Handy, Kelvin, Kerf, Lava, Slab, Tuck | Contact page |
| Bloom, Chalk, Ember, Fold, Hush, Jab, Junction, Lantern, Mint, Putty, Razor, Stroll, Tiny Town, Toon, Wag, Whisker | Visit page |
Messages go to one address: the Email in Site settings (in the content editor, Site settings → Email; Swell calls it Support email). It’s read on every message, so a change there applies after your next deploy without touching any keys.
Each message email:
- comes from your
EMAIL_FROMaddress, - has the visitor’s address as reply-to, so Reply goes to them,
- has a subject from Interface texts → Emails (the contact or quote email subject), where
{name}is the visitor’s name, e.g. “Quote request from {name}”, - contains the visitor’s name, email and message as plain text.
Nothing is stored on your site: the email is the only copy.
Without a key
Section titled “Without a key”The form works and shows its “sent” message, but no email goes out. The terminal running
npm run dev prints one line instead:
[email] to you@example.com: Quote request from AnaThat line shows the recipient and the subject only, not the message. It is enough to check that the form reaches the server and goes to the right address.
1. Create a Resend account and verify your domain
Section titled “1. Create a Resend account and verify your domain”Resend sends email on behalf of your domain, so it must prove the domain is yours.
- Sign up at resend.com.
- Open Domains → Add Domain and enter your domain (e.g.
example.com, or a subdomain such asmail.example.com). - Resend shows a few DNS records (for SPF and DKIM). Add each one where you manage your domain’s DNS: at your registrar, or in Vercel under Domains if Vercel runs your DNS.
- Back in Resend, click Verify. It can take from minutes to a few hours; the domain shows Verified when it’s ready.
2. Create an API key
Section titled “2. Create an API key”- In Resend, open API Keys → Create API Key.
- Name it (e.g.
my-site). Sending access is enough; you can limit it to your domain. - Copy the key (it starts with
re_). You see it only once.
3. Add the settings to .env
Section titled “3. Add the settings to .env”RESEND_API_KEY=re_...EMAIL_FROM="Your Business <hello@example.com>"RESEND_API_KEY: the key from step 2.EMAIL_FROM: the sender, asName <address>. The address must be on the domain you verified. Keep the quotes. Each template ships with an example sender on a.exampledomain, which can’t send: always set your own.
The same two settings send every other email of the site too (welcome emails, payment emails): see Emails.
Restart npm run dev.
4. Try it on your computer
Section titled “4. Try it on your computer”- In the content editor (
/keystatic), open Site settings and set Email to an inbox you can check. Save. - Open the page with the form (table above) and fill it in: a name, a valid email and a message. Click send.
- The form shows its “sent” text.
- Within a minute the message is in the inbox from step 1. Click Reply: the reply is addressed to the email you typed in the form.
- In Resend, Emails lists every email sent, with its status (delivered, bounced…).
Also try leaving the email field invalid: the form shows the “check the fields” text and nothing is sent.
5. Put it online
Section titled “5. Put it online”- In Vercel, Settings → Environment Variables: add
RESEND_API_KEYandEMAIL_FROMwith the same values. - Redeploy, then send one message from the live site.
Changing the texts
Section titled “Changing the texts”- Labels, button and the sent / invalid / error messages: in the content editor, on the page that shows the form (look for the contact or quote form group), or under Interface texts, depending on the template.
- The subject of the email you receive: Interface texts → Emails.
The form has a hidden field that people never see and bots fill in; when it’s filled, the form pretends to succeed and sends nothing. Messages need a name, a valid email address and a message; names are cut at 200 characters and messages at 5,000.
Troubleshooting
Section titled “Troubleshooting”| What you see | Why, and what to do |
|---|---|
| The “something went wrong” text | Resend refused the email. The terminal (online: Vercel → your deployment → Logs) shows [contact] send failed with Resend’s reason. Most often EMAIL_FROM isn’t on a verified domain, or the key is wrong |
| “Sent”, but nothing arrives | Check Resend → Emails for the status. If it’s not listed, the server has no key: restart npm run dev, or add the variables in Vercel and redeploy. If it’s delivered, look in spam, and check Site settings → Email |
| Only a line in the terminal | RESEND_API_KEY is empty or the server wasn’t restarted |
| The domain stays unverified | DNS changes can take hours. Check that each record’s name and value match exactly what Resend shows (some DNS panels add your domain to the name automatically) |