# Sending Email from AI-Built Apps (Lovable, Bolt, Base44, Replit)

Source: https://wraps.dev/blog/vibe-coding-email

Vibe Coding + Email Guide

You shipped an app with Lovable, Bolt, Base44, or Replit. Now users need automated emails. Here's the right way to wire it up — your app emits events, Wraps sends the emails, zero email logic in your code.

10 min read•Wraps Team

10 min

Setup time

$0.10

Per 1,000 emails

4

Platforms supported

## Don't Put Email Logic in Your App

The instinct is to add a "send email" function to your app. Problem: now email logic is scattered across your codebase, you need to redeploy to change an email, and you're managing a mail server from within application code.

The real trap

Every email becomes a code change. Welcome email tweaks, subject line tests, timing changes — all require a deploy. Email logic belongs in a workflow tool, not your app.

## Emit Events. Let Workflows Handle the Email.

Your app does one thing: tell Wraps what happened. A Wraps workflow handles everything else — what email to send, when to send it, what to do if the user doesn't engage.

### The core pattern (same across all platforms)

From your server function — that's it Copy

// From your server function — that's it
await wraps.track("user.signed\_up", {
  contactEmail: user.email,
  contactName: user.name,
  createIfMissing: true,
  properties: { plan: "free", source: "lovable" },
});

That's the entire integration. Your app has no email templates, no send logic, no SMTP configuration. Change the welcome email subject line? Do it in the Wraps dashboard. Add a 3-day follow-up? Add a step in the workflow. No redeploy.

## How It Works

Four steps — your event in, an email out, without touching your app code again.

1

#### Your app emits an event

POST to api.wraps.dev/v1/events/ with an event name, contact email, and optional properties.

2

#### Wraps stores it

The event is recorded on the contact's timeline. Every event, every contact, all in one place.

3

#### Workflows trigger

Any workflow with a matching event trigger starts an execution — delays, branches, conditions, sequences.

4

#### Email sends via your SES

The email goes through SES in your AWS account — your domain, your sending reputation, $0.10 per 1,000 emails paid directly to AWS.

One-time setup: 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 directly — no Lambda, no infrastructure to manage. API keys live in [app.wraps.dev](https://app.wraps.dev).

## Pick Your Platform

Each platform has its own mechanism for running server-side code and storing secrets. Pick the guide for your platform.

[

Lovable

Supabase Edge Function → direct fetch to api.wraps.dev

Read the Lovable guide →](https://wraps.dev/blog/lovable-send-email)[

Bolt.new

Node.js server + @wraps.dev/client SDK

Read the Bolt.new guide →](https://wraps.dev/blog/bolt-send-email)[

Base44

Backend function + @wraps.dev/client SDK

Read the Base44 guide →](https://wraps.dev/blog/base44-send-email)[

Replit

Node.js server + @wraps.dev/client SDK

Read the Replit guide →](https://wraps.dev/blog/replit-send-email)

## FAQ

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

Your app says "this happened" (user.signed\_up, order.placed). Wraps decides what to do — send a welcome email, wait 3 days, send a follow-up, branch based on whether the user clicked. Email logic lives in the workflow, not your code. You can change the email content without touching your app.

Do I need to deploy anything to AWS?

Can I call the Wraps API directly from my frontend?

What does this cost?

What can I do in a workflow that I can't do with a direct send?

### Start Emitting Events

One event call. Your AWS account for sending. Works with any platform.

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