# How to Send Email from Your Base44 App

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

Base44 + Email Guide

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

10 min read•Wraps Team

10 min

Setup

$0.10

Per 1K emails

0 lines

Of email logic

What you're building

Your Base44 backend 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 Base44. You only do this once per AWS account.

### Set up AWS

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

### Deploy email infrastructure

This sets up SES in your AWS 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

Go to the [Wraps dashboard](https://app.wraps.dev) → **Settings → API Keys** and create a key named `base44-app`.

Copy the key now

The full key is only shown once. If you lose it, create a new one in the dashboard.

## Add the key to Base44

Go to **Project → Settings → Server Secrets** in Base44 and add:

Base44 → Project → Settings → Server Secrets Copy

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

Don't put the key in frontend components

It runs in the browser — anyone in DevTools can read it. Server Secrets are only accessible to backend functions, never sent to the browser.

## Emit events from your backend

Install the SDK in your Base44 project:

Terminal Copy

npm install @wraps.dev/client

Create a shared client module:

backend/lib/wraps.js Copy

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

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

Emit a behavioral event when something happens in your app:

backend/functions/onSignup.js (example backend function) Copy

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

export async function onSignup({ email, name }) {
  // ... your signup logic ...

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

Your frontend calls the backend function — not Wraps directly:

Call from your frontend (safe — calls your backend function) Copy

// Frontend component — calls backend function, not Wraps directly
import { onSignup } from "@/backend/onSignup";

await onSignup({ email: user.email, name: user.name });

## Set up a workflow in Wraps

This is where you define what happens when the event fires — no code required.

1.  1Go to [Dashboard](https://app.wraps.dev) → **Workflows → New workflow**
2.  2Set the trigger to **Event received** → `user.signed_up`
3.  3Add a step: **Send email** → choose your template

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

## Common events to track

Emit these from your Base44 backend functions and wire up a workflow for each one.

| Event | Sends |
| --- | --- |
| `user.signed_up` | Welcome email |
| `order.placed` | Order confirmation |
| `password.reset_requested` | Reset email |
| `subscription.cancelled` | Win-back email |
| `trial.ending` | Upgrade nudge |

## FAQ

Do I need to deploy anything to AWS?

Run `wraps 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 to deploy or manage.

Can I call the SDK from Base44 frontend code?

Where do I add secrets in Base44?

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 Base44 App?

Emit events from your backend. Wraps workflows handle the rest — welcome emails, receipts, nudges. 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)[How to Send Email from Your Bolt.new App](https://wraps.dev/blog/bolt-send-email)
