Static Site Form SMTP: Connect Formspree & Web3Forms to Your Domain
Stop losing leads to spam. Route static site forms through your SMTP.
By JustEmails Platform Team
The contact form looked fine. Worked fine too — you'd fill it out, hit submit, get the little success message. But the emails? Landing in spam. Or getting blocked entirely.
A freelancer running a Hugo site told me she'd lost three client inquiries before realizing her Formspree submissions were getting filtered. Three. The leads had filled out the form, gotten confirmation, assumed she'd respond. She never saw them.
That's the problem with default form-backend email delivery. Formspree, Web3Forms, Basin, Getform — they all work great for collecting submissions. But they send from their own infrastructure, their own domains, their own reputation. Your prospects don't get email from you. They get email from noreply@formspree.io or whatever the service uses. Spam filters notice. I've watched it happen on two of my own projects, and honestly it's embarrassing how long it took me to figure out what was going wrong. If you're comparing email hosting options, deliverability should be front and center.
By the end of this, you'll have static-site forms that route through JustEmails SMTP. Submissions arrive from your domain, authenticated with your SPF/DKIM/DMARC, looking like actual business correspondence. Because they are.
What We're Building
A form workflow where:
- Your static site (Hugo, Astro, Next.js, whatever) posts submissions to a form backend
- The form backend relays those submissions through JustEmails SMTP
- Emails arrive from
contact@yourdomain.cominstead of a third-party address - Your domain's authentication records validate the mail
This works for contact forms, quote requests, newsletter signups, lead magnets — anything where the form backend needs to notify you about a submission.
If you're building transactional emails into your app itself (password resets, order confirmations), the SMTP vs API comparison breaks down when each approach makes sense. For form-backend routing, SMTP is the play.
Prerequisites
- A static site deployed somewhere (Netlify, Vercel, Cloudflare Pages, self-hosted — doesn't matter)
- A form backend account that supports custom SMTP — I'll cover Formspree Gold and Web3Forms Pro
- A JustEmails account with at least one domain configured (see our custom domain email setup guide)
- Your domain's SPF, DKIM, and DMARC records set up (JustEmails auto-configures these when you add a domain)
One heads up: not every form backend supports custom SMTP. Free tiers almost never do. Formspree requires their Gold plan ($50/month). Web3Forms offers SMTP on their Pro tier. Basin has it on paid plans. If your current backend doesn't support SMTP relay, you'll need to upgrade or switch.
(I really wish more free tiers included this. The cost difference between "works" and "works and doesn't look sketchy to Gmail" shouldn't be $50/month, but here we are.)
Step 1: Get Your JustEmails SMTP Credentials
Log into justemails.app and grab these:
| Setting | Value |
|---|---|
| Host | smtp.justemails.app |
| Port | 587 |
| Encryption | STARTTLS |
| Username | Your full email address (e.g., forms@yourdomain.com) |
| Password | Account password or app-specific password |
Create a dedicated mailbox for form submissions. Something like forms@yourdomain.com or contact@yourdomain.com. Keeps things organized, and if you ever need to rotate credentials, you're not touching your main inbox.
Why this matters: the form backend will authenticate as this user when sending. The From address should match. If you send as contact@yourdomain.com but authenticate as hello@yourdomain.com, some receiving servers get suspicious. Match them and you're fine.
Step 2: Configure Formspree with Custom SMTP
Formspree Gold ($50/month) includes custom SMTP configuration. Here's the setup.
In your Formspree dashboard:
- Open your project and select the form you want to configure
- Go to Settings → Email
- Toggle "Custom SMTP" on
- Enter your SMTP details:
Host: smtp.justemails.app
Port: 587
Encryption: STARTTLS
Username: forms@yourdomain.com
Password: [your password]
- Set the From address to match your SMTP username
- Save and test
Formspree will send a test email through your SMTP server. Check that it arrives (and check spam, just in case). If it works, all future submissions route through JustEmails.
What if the test fails?
Most common issue: wrong port or encryption combo. Port 587 with STARTTLS is standard. Some services confuse this with port 465 (implicit TLS) — they're not interchangeable. JustEmails uses 587.
Second most common: authentication error. Double-check the password. Copy it fresh from your JustEmails dashboard. Trailing whitespace in password fields causes more debugging hours than I want to admit. Ask me how I know. (Don't actually. It's painful.)
Step 3: Configure Web3Forms with Custom SMTP
Web3Forms handles things differently. Their free tier uses their own delivery, but Pro ($4/month) supports SMTP relay.
In your Web3Forms dashboard:
- Go to Settings → SMTP Configuration
- Enable custom SMTP
- Enter:
SMTP Host: smtp.justemails.app
SMTP Port: 587
SMTP User: forms@yourdomain.com
SMTP Password: [your password]
TLS: Yes
- Set the From Name and From Email to match your SMTP user
- Save configuration
Web3Forms is cheaper than Formspree for SMTP ($4/month vs $50/month). That's a pretty massive gap. The tradeoff: fewer integrations, smaller feature set. For basic contact forms where you just need submissions emailed, Web3Forms Pro does the job. For more advanced workflows — conditional logic, file uploads, Notion/Airtable integrations — Formspree might be worth the premium.
My honest take? Formspree's $50/month feels steep for what is essentially SMTP relay. But their UI is better and the docs are clearer. You're paying for polish.
Step 4: Update Your Form's Frontend Code
The form HTML doesn't change much. You're still posting to Formspree or Web3Forms. The SMTP configuration lives in their backend.
Here's a basic contact form for Hugo (works the same for Astro, Eleventy, or any static generator):
<form action="https://formspree.io/f/yourformid" method="POST">
<label for="name">Name</label>
<input type="text" id="name" name="name" required>
<label for="email">Email</label>
<input type="email" id="email" name="email" required>
<label for="message">Message</label>
<textarea id="message" name="message" required></textarea>
<button type="submit">Send</button>
</form>
For Web3Forms, swap the action URL:
<form action="https://api.web3forms.com/submit" method="POST">
<input type="hidden" name="access_key" value="your-access-key">
<!-- rest of fields -->
</form>
The frontend stays the same whether you're using default delivery or custom SMTP. All the routing magic happens server-side.
Step 5: Verify Email Authentication
Submit a test through your form. When the email arrives:
- Open it in Gmail or Outlook
- View the full headers ("Show original" in Gmail, "View source" in Outlook)
- Look for these lines:
SPF: PASS
DKIM: PASS
DMARC: PASS
All three should pass. If SPF fails, your domain's SPF record might be missing the JustEmails include. If DKIM fails, the DKIM record hasn't propagated or isn't configured correctly. JustEmails auto-generates these records — check your domain settings in the dashboard and compare against what's in your DNS.
Pro tip: DNS propagation isn't instant. I've seen it take anywhere from 5 minutes to 48 hours, and there's no reliable way to speed it up. Just wait. Refresh. Wait more. It'll get there. Understanding return path vs from address helps debug authentication issues.
For a deeper dive on getting DMARC from monitoring to enforcement, the DMARC p=none to p=reject guide walks through the process.
Step 6: Set Up Reply-To Correctly
This catches people. The visitor fills out your form with their email. You want to reply to them. But if Reply-To isn't set, you're replying to your own forms@ address.
Both Formspree and Web3Forms support dynamic Reply-To. Include the visitor's email in a field named _replyto or replyto:
<input type="email" name="_replyto" placeholder="Your email">
When the submission email arrives, hitting Reply addresses it to the visitor, not your forms mailbox. Small detail that saves a lot of copy-pasting.
Common Errors and Fixes
Here's what usually goes wrong, and how to fix it.
"Authentication failed" or "Invalid credentials"
The username must be the full email address — forms@yourdomain.com, not just forms. The password is case-sensitive. Copy it fresh, paste it directly.
Emails arrive but go to spam
Run your form submission through mail-tester.com. You'll get a score out of 10 and a breakdown of what's failing. Below 8 means work to do. Usually it's a missing SPF include or DKIM record. DNS propagation can take a few hours — if you just set things up, wait and retest.
"Connection timed out" or "Unable to connect"
Port 587 might be blocked. This is rare on Formspree's infrastructure, but can happen with self-hosted form processors. Confirm the port and TLS settings match exactly.
Emails arrive but Reply-To doesn't work
Check the field name in your form. Formspree uses _replyto. Web3Forms accepts replyto or reply_to. The underscore matters. And don't accidentally name it reply-to with a hyphen — that's an HTTP header, not a form field.
Submissions work but I'm not getting notified
Some form backends have separate settings for SMTP delivery and dashboard notifications. Make sure email notifications are actually enabled. Formspree has a toggle per form; Web3Forms sends by default but can be turned off.
When to Skip the Form Backend Entirely
Look, form backends are convenient. Drop in a form action, done. But they add cost ($4-50/month) and a dependency. Another vendor. Another thing that can break.
If you're already running a serverless function for something else — Next.js API routes, Netlify Functions, Vercel Edge Functions — you can handle form submissions directly. Post to your own endpoint, process the data, send via JustEmails SMTP or the transactional API. No middleman. A bit more work upfront, but one less bill.
For simple static sites (Hugo, Jekyll, Eleventy) without a backend? Formspree and Web3Forms make sense. For Next.js, Astro with SSR, or anything with server capability? Roll your own. Probably cleaner in the long run. If you're evaluating flat-fee vs per-mailbox pricing, JustEmails' unlimited domains model works well for agency setups.
Next Steps
Forms are routing through your SMTP. Now what?
- Monitor deliverability. Google Postmaster Tools shows how Gmail treats your domain. Check monthly.
- Set up a dedicated forms@ mailbox. Separate from your personal inbox. JustEmails' unified dashboard lets you see everything in one place without mixing contact form noise with actual correspondence.
- Add form analytics. Formspree tracks submission counts; for deeper analytics across your marketing funnel, JustAnalytics ties form submissions to traffic sources.
- Consider automation. Submissions hitting your inbox can trigger Zapier workflows. Our Zapier integration guide covers the setup.
For agencies managing forms across client sites, the unlimited domains on JustEmails mean you're routing all your client contact forms through one account. Same $49/year whether it's 3 domains or 30.
Frequently Asked Questions
Can Formspree send emails through my own SMTP server?
Formspree's Gold plan ($50/month) supports custom SMTP. You configure your SMTP host, port, username, and password in Formspree's dashboard. Submissions then route through your mail server instead of Formspree's default infrastructure. The From address matches your domain, and your SPF/DKIM records handle authentication.
How do I make contact form emails come from my domain instead of the form service?
You need a form backend that supports custom SMTP and an email provider that gives you SMTP credentials. Configure the form service to use your SMTP host, port, and authentication. The emails will then send from your domain with your authentication records, appearing as legitimate mail from your business rather than a third-party service.
Why do my static site contact form emails go to spam?
Form backends that don't support custom SMTP send from their own servers with their own From addresses. Gmail and Outlook see these as third-party mail, not direct business correspondence. Without your domain's SPF, DKIM, and DMARC authentication, spam filters score them lower. Routing through your own SMTP with proper DNS records fixes this.
What's the difference between Formspree Free and Formspree Gold for email delivery?
Formspree Free sends submissions from Formspree's servers using their email infrastructure. Emails arrive from a Formspree address or a generic noreply. Formspree Gold lets you configure custom SMTP, so submissions send through your mail server from your domain. Gold costs $50/month but gives you branded email, better deliverability, and full control over authentication.
Try JustEmails
Unlimited custom domain email hosting for $49/year — unlimited domains, unlimited mailboxes, 10 GB storage, full IMAP/SMTP. Built for agencies, freelancers, and anyone managing email across more than one domain.