# Lovable

> Add email sending with MailBlastr to a Lovable project, storing your API key securely via Supabase.

[Lovable](https://lovable.dev) is a platform for building sites, tools, apps, and projects via chat. You can add MailBlastr to a Lovable project by asking the chat to add email sending with MailBlastr.

## 1. Add your MailBlastr API key

Create a MailBlastr API key in the [dashboard](https://www.mailblastr.com/docs/api-keys/overview). Lovable may wire up email in a few ways:

- Store the API key as a secret via the **Supabase integration** *(highly recommended)*.
- Prompt you to provide your own API key.
- Add the API key directly in the code (least secure — avoid).

Prompt Lovable to store the key for MailBlastr using Supabase. The send itself runs in a Supabase Edge Function; in Deno/Edge environments it can `POST` to `https://api.mailblastr.com/emails` directly, or use the `mailblastr` Node SDK (`npm install mailblastr`) when the function targets a Node-compatible runtime.

> **Note:** At the time of writing, Lovable relies on the Supabase integration to store secrets rather than handling API keys independently. Keep the key out of client-side code.

## 2. Add a custom domain

By default you can only send email to your own address. To send to other recipients, [add and verify a custom domain](https://www.mailblastr.com/docs/add-a-domain), then update the `from` address used by the edge function.

> **Warning:** Once your custom domain is verified, the edge function does not redeploy automatically. Ask Lovable to update the `from` address to your verified domain and redeploy the function so the change takes effect.
