# How to Send Email from Your Bolt.new App

Source: https://wraps.dev/blog/bolt-send-email

Bolt.new + Email Guide

You built it in Bolt. Now users need a welcome email, a receipt, a password reset. Here's how to wire it up in 10 minutes — without writing a single line of email logic in your app.

10 min read•Wraps Team

10 min

Setup time

$0.10

Per 1K emails

0 lines

Of email logic in your app

What you're building

Your Bolt.new server emits a behavioral event when something happens. A Wraps workflow catches it and sends the email. Your app has no email logic — it just says "this happened."

## One-time setup

Run these in your local terminal — not inside Bolt.new.

### Set up AWS

You need an AWS account with the CLI configured. Free tier is enough for most apps. [AWS setup guide](https://wraps.dev/docs/guides/aws-setup)

### Deploy email infrastructure

Sets up SES in your account and verifies your sending domain. [Domain verification guide](https://wraps.dev/docs/guides/domain-verification)

Terminal Copy

npx @wraps.dev/cli email init

### Connect to the Wraps Platform

Terminal Copy

npx @wraps.dev/cli platform connect

Creates a cross-account IAM role so the Wraps Platform can send email through your SES when a workflow fires. Run this once — re-run `wraps platform update-role` if you add new features later.

## Get a Wraps API key

In the [Wraps dashboard](https://app.wraps.dev), go to **Settings → API Keys** and create a new key named `bolt-app`.

Copy the key now — shown once.

Once you close the dialog the full key is gone. If you lose it, delete it from the dashboard and create a new one.

## Add the key to Bolt.new (.env)

Add it to your server-side `.env` file — no `VITE_` prefix.

Never use VITE\_WRAPS\_API\_KEY

Bolt.new uses Vite — `VITE_` variables get bundled into browser JS and are readable in DevTools. Server-side `.env` variables are only accessible in your Node.js routes.

.env (server-side only) Copy

WRAPS\_API\_KEY=wraps\_a1b2c3d4....<hmac>

## Emit events from your server

### Install the SDK

Terminal Copy

npm install @wraps.dev/client

### Initialize once, use anywhere

server/lib/wraps.ts Copy

import { createPlatformClient } from "@wraps.dev/client";

export const wraps = createPlatformClient({
  apiKey: process.env.WRAPS\_API\_KEY!,
});

### Emit events from your routes

server/routes/auth.ts (or wherever events happen) Copy

import { wraps } from "../lib/wraps";

// When a user signs up
app.post("/api/signup", async (req, res) => {
  const { email, name } = req.body;
  // ... create user ...

  await wraps.track("user.signed\_up", {
    contactEmail: email,
    contactName: name,
    createIfMissing: true,
    properties: { plan: "free", source: "bolt" },
  });

  res.json({ success: true });
});

// When an order is placed
app.post("/api/orders", async (req, res) => {
  // ... process order ...

  await wraps.track("order.placed", {
    contactEmail: req.user.email,
    properties: { orderId: order.id, amount: order.total },
  });

  res.json({ order });
});

## Set up a workflow in Wraps

Email logic lives in the Wraps dashboard, not your code.

1.  1Dashboard → Workflows → New workflow
2.  2Trigger: **Event received** → event name: `user.signed_up`
3.  3Step: **Send email** → choose your template

See the [custom events guide](https://wraps.dev/docs/guides/custom-events) for full workflow reference.

## Common events to track

| Event | Triggers |
| --- | --- |
| `user.signed_up` | Welcome email |
| `order.placed` | Order confirmation |
| `password.reset_requested` | Password reset |
| `subscription.cancelled` | Win-back sequence |
| `trial.ending` | Upgrade nudge |

## FAQ

Do I need to deploy anything to AWS?

Run `npx @wraps.dev/cli email init` to set up SES, then `wraps platform connect` to give Wraps permission to send through your SES in workflows. After that, your app calls `api.wraps.dev` via the SDK — no Lambda deploy needed.

Can I call the Wraps client SDK from my Bolt.new frontend?

Does Bolt.new have a backend I can use?

What's the difference between emitting an event and sending an email?

What does this cost?

How do I get out of the SES sandbox?

### Ready to Connect Your Bolt.new App?

Emit an event from your server. Wraps sends the email. No email logic in your code.

[Custom Events Guide](https://wraps.dev/docs/guides/custom-events)[Open Wraps Dashboard](https://app.wraps.dev)

## Related Articles

[Sending Email from AI-Built Apps (Lovable, Bolt, Base44)](https://wraps.dev/blog/vibe-coding-email)[How to Send Email from Your Lovable App](https://wraps.dev/blog/lovable-send-email)[4 Email Flows Your Supabase App Needs Before Going Live](https://wraps.dev/blog/supabase-email-guide)
