# Replit

> Add email sending with SendDart to a Replit project with an API key and verified from address.

[Replit](https://replit.com) is a platform for building sites and apps with AI. You can add SendDart to a Replit project by asking the chat to add email sending with SendDart.

### Example prompt

```text
When someone fills out the contact form, send an email using SendDart.
```

## 1. 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.senddart.com/docs/add-a-domain), then use an address on that domain as the `from` address in the next step.

## 2. Add your SendDart API key and from address

Create a SendDart API key in the [dashboard](https://www.senddart.com/docs/api-keys/overview) and store it as a secret (e.g. `SENDDART_API_KEY`). The `from` address is the verified address your email is sent from — use the custom domain you added in step 1 (e.g. `hello@example.com`). In Node.js Repls, Replit can install the official `senddart` SDK (`npm install senddart`) and call `mb.emails.send(...)`. In other languages, the generated code calls the SendDart API over plain HTTP.

> **Warning:** Do not share your API key or expose it in the browser or other client-side code. Store it as a Replit secret and read it server-side.
