# Bolt.new

> Add email sending with MailBlastr to a Bolt.new project using a .env-stored API key.

[Bolt.new](https://bolt.new) is a platform for building full-stack web and mobile apps via chat. You can add MailBlastr to a Bolt.new 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). To store it safely, use a `.env` file — you may need to include that instruction in your prompt to Bolt.new. In Node.js projects, tell Bolt to install the official `mailblastr` SDK (`npm install mailblastr`) and call `mb.emails.send(...)` server-side. In other runtimes, Bolt can send via a plain `POST` to `https://api.mailblastr.com/emails` with `Authorization: Bearer $MAILBLASTR_API_KEY`.

> **Warning:** Do not share your API key or expose it in the browser or other client-side code. Read it from `process.env` on the server.

## Example prompt

```text
Add email sending with MailBlastr. Store the API key in a .env file as
MAILBLASTR_API_KEY. When the form is submitted, send an email server-side by
POSTing to https://api.mailblastr.com/emails with an Authorization: Bearer header.
```

## 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` field in the send code to use an address on that domain (or ask the chat to update it).
