Wraps Logo
Vibe Coding + Email Guide

Sending Email from AI-Built Apps

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 readWraps 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
// 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.

Pick Your Platform

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

FAQ

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.

Start Emitting Events

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