# Bolt.new

> Add email sending with SendPing 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 SendPing to a Bolt.new project by asking the chat to add email sending with SendPing.

## 1. Add your SendPing API key

Create a SendPing API key in the [dashboard](https://www.sendping.co/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 `sendping` SDK (`npm install sendping`) and call `mb.emails.send(...)` server-side. In other runtimes, Bolt can send via a plain `POST` to `https://www.sendping.co/api/emails` with `Authorization: Bearer $SENDPING_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 SendPing. Store the API key in a .env file as
SENDPING_API_KEY. When the form is submitted, send an email server-side by
POSTing to https://www.sendping.co/api/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.sendping.co/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).
