Skip to content
All guides

How to make forms on an AI-built website send email

A form built with Lovable, Bolt or another AI tool needs a real submission handler. A success message alone does not show that the inquiry was saved or an email was sent.

1. Check what your form already does

Ask your AI tool to show the current submit handler and its destination. Keep a working integration. If the handler only logs the values, waits briefly or displays a toast, it still needs a receiver.

You can use your platform’s email feature or a form backend. Lovable supports native form notifications on paid plans with a configured sending domain. An external form service is an alternative, not a requirement.

2. Get a receiving URL

Create a form with your chosen receiver, set the notification address and copy its public receiving URL. Use that URL in browser code, never a private mail API key or SMTP password.

3. Give your AI tool the URL

For the GlueForms recipe, paste this into the chat that built your website:

Example
Connect my existing form to YOUR_FORM_URL, keeping its fields and design.
Follow https://glueforms.com/docs/connect for installation instructions.
Send a real POST. Show success only after confirmed acceptance.
Keep entered values on failure. Do not add a second submit handler.

The installation guide explains how to recover a design with GET to the same URL. A 200 response returns HTML with empty controls. If the body is empty, the tool can write HTML for that form. A 404 requires a valid receiving URL. The submission must POST to that same URL.

4. Check the request and saved message

Send a recognizable test from your website. For JavaScript, check both a successful HTTP response and accepted: true before showing success. Keep fields after an error and retain the same submission ID when retrying unchanged data. The JavaScript recipe provides that handler.

Open the saved message and check its fields. A native HTML form instead opens a confirmation page or configured redirect after acceptance.

5. Test the published page

Publish, send once from the public page and inspect the saved message and notification state. A saved inquiry and an email notification are separate results. If the email is missing, trace the notification before submitting duplicates.

Use GlueForms for receiving and email

GlueForms gives your form a receiving URL, stores accepted messages and sends email notifications. A notification failure does not remove the saved message. Create a free form, then use its URL in your existing design.