Contact Form Not Sending Emails in Bolt App
Your Bolt.new application has a contact form that appears to work perfectly: users fill it out, click submit, and see a 'Thank you, message sent!' confirmation. But the email never arrives. You only discover the problem when someone follows up asking why you never replied to their inquiry.
This is a devastating issue for business websites. Every missed contact form submission is a potential lost customer, partnership, or support request. The false success message makes it worse because the sender believes their message was received and doesn't try to contact you through other channels.
Bolt's AI often generates beautiful contact form UIs with client-side validation but doesn't properly implement the backend email sending logic. The form submits to an API route that either doesn't exist, doesn't actually send the email, or silently fails without error handling.
Error Messages You Might See
Common Causes
- No backend email sending logic — Bolt generated the form UI and success message but the API route just returns 200 OK without actually sending an email
- Email API key not configured — The code references an email service (Resend, SendGrid) but the API key environment variable is empty or missing
- From address not verified — Email services require sender domain verification, and the 'from' address uses an unverified domain
- API route doesn't exist — The form submits to /api/contact but the route file was never created, returning a 404 that the frontend doesn't check for
- Frontend ignores API errors — The form shows the success message regardless of the API response status, masking all backend failures
How to Fix It
- Implement the API route — Create a proper email sending endpoint using Resend: import { Resend } from 'resend'; const resend = new Resend(process.env.RESEND_API_KEY); await resend.emails.send({ from: 'contact@yourdomain.com', to: 'you@email.com', subject, html })
- Verify your sending domain — In your email provider's dashboard, add and verify your domain by adding the required DNS records (SPF, DKIM, DMARC)
- Check API response before showing success — Update the form handler: const res = await fetch('/api/contact', { method: 'POST', body }); if (!res.ok) { setError('Failed to send. Please try again.'); return; } setSuccess(true);
- Add fallback notification — Store contact submissions in your database as a backup, so you never lose messages even if email delivery fails
- Test the full flow end-to-end — Submit the form and verify the email arrives, don't just check the API response status
Real developers can help you.
You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.
Get HelpFrequently Asked Questions
What is the easiest email service to set up with Bolt?
Resend is the simplest to integrate. Install it with npm install resend, create a free account at resend.com, get your API key, and add three lines of code to send emails. The free tier includes 3,000 emails per month.
Why does my contact form show success but no email is sent?
The most common cause is that the frontend shows a success message after the form submits without checking the API response. The API route either doesn't exist (404), doesn't have email sending logic, or throws an error that the frontend ignores. Always check response.ok before showing success.