To keep the destination recipient strictly private and never exposed in frontend code, this form dispatches a `POST` request to `/api/inquiry`. In production deployment (Vercel, Cloudflare Workers, Netlify, or AWS Lambda), configure the following environment variables on the server:
# Required Server-Side Environment Variables (Never exposed to client):
INQUIRY_DESTINATION_RECIPIENT=[Configured privately on server for Simple.Domains sales routing]
TRANSACTIONAL_MAIL_API_KEY=[Your Resend / SendGrid / Postmark / SES API Key]
# Serverless Handler (/api/inquiry.js):
export default async function handler(req, res) {
if (req.method !== 'POST') return res.status(405).json({ error: 'Method Not Allowed' });
const { name, business_email, company, inquiry_type, application_direction, message, website_url } = req.body;
if (website_url) return res.status(200).json({ status: 'filtered' }); // Honeypot check
// Forward payload via transactional provider to process.env.INQUIRY_DESTINATION_RECIPIENT
return res.status(200).json({ ok: true });
}
Validated Inquiry Payload Prepared for Dispatch: