Forms, Turnstile, and Email Delivery

Forms, Turnstile, and Email Delivery

AstroWEBTheme's contact forms come wired for Turnstile bot protection, DNS-aware sender authentication, and routing to email delivery or transactional providers.

A contact form looks simple until it has to handle spam, prove delivery, and land in an inbox instead of a spam folder. AstroWEBTheme’s form and email setup is configured in src/site/config/email.mjs and src/site/config/captcha.mjs, so these decisions are explicit project configuration rather than scattered logic.

Turnstile instead of a traditional CAPTCHA

Forms are built to work with Cloudflare Turnstile, which verifies a visitor is likely human without the visible puzzle-solving of older CAPTCHA systems. This keeps the form usable while still filtering automated submissions.

Routing: email delivery or a transactional provider

Submitted forms can route through Cloudflare Email Routing for straightforward delivery, or to a transactional email provider when a project needs delivery tracking, templating, or higher volume. The choice is a configuration decision, not a rebuild.

Sender-domain authentication

Deliverability depends on DNS records — SPF, DKIM, and DMARC — matching the sending domain. Getting these right before launch is what keeps notification emails out of spam folders.

Client-side and server-side validation

Forms validate on both sides: immediate feedback for the visitor, and server-side checks before anything is accepted, so a disabled script in the browser cannot bypass validation entirely.

Need the DNS, provider, and Turnstile setup done against your own domain? NViewsWEB configures forms and email delivery as part of any Astro launch.