Skip to main content
This guide walks you through deploying Wraps email infrastructure and sending your first email. The entire process takes about 2 minutes.

Prerequisites

  • Node.js 20+
  • AWS credentials configured (guide)
  • A domain you control (to add DNS records)

What gets deployed

Running wraps email init creates the following resources in your AWS account:
ResourceDetails
SES configuration setNamed wraps-email-* with open/click tracking
EventBridge ruleRoutes SES events (bounces, complaints, deliveries)
SQS queueBuffers events for processing
DynamoDB tableStores email event history (configurable retention)
Lambda functionProcesses events and handles webhooks
IAM roleLeast-privilege role with OIDC support
All resources are tagged ManagedBy: wraps-cli.

Configuration presets

Choose a preset during setup. You can upgrade later with wraps email upgrade.
PresetEstimated costFeatures
starter~$0.05/moOpen/click tracking, bounce suppression
production~$2–5/mo+ Event tracking, 90-day history, reputation metrics
enterprise~$50–100/mo+ Dedicated IP, 1-year history, all event types
Email sending costs $0.10 per 1,000 emails (AWS SES pricing), billed directly by AWS.
1

Deploy infrastructure

Run the following command. No install required — npx fetches the CLI automatically.
npx @wraps.dev/cli email init
The CLI will prompt you for:
  • Hosting provider — Vercel, AWS, Railway, or other
  • AWS region — defaults to your configured region
  • Domain name — the domain you’ll send from (e.g., yourapp.com)
  • Configuration preset — starter, production, or enterprise
To skip prompts, pass flags directly:
npx @wraps.dev/cli email init --region us-east-1 --domain yourapp.com --preset production
Deployment takes about 2–3 minutes. When complete, the CLI prints your IAM role ARN and configuration set name.
If you want to preview what will be created without deploying, run npx @wraps.dev/cli email init --preview.
2

Add your domain to SES

Add the domain you’ll be sending from:
npx @wraps.dev/cli email domains add -d yourapp.com
This registers the domain in SES and returns DKIM tokens you’ll need to add to your DNS provider.
3

Configure DNS records

Fetch the DKIM tokens for your domain:
npx @wraps.dev/cli email domains get-dkim -d yourapp.com
The command prints three CNAME records in this format:
<token>._domainkey.yourapp.com  CNAME  <token>.dkim.amazonses.com
Add these CNAME records to your DNS provider. You also need:
  • SPFTXT record on yourapp.com: v=spf1 include:amazonses.com ~all
  • DMARCTXT record on _dmarc.yourapp.com: v=DMARC1; p=none; rua=mailto:[email protected]
If your DNS is managed by Route 53, Vercel, or Cloudflare, the CLI can create these records automatically during wraps email init.
4

Verify DNS propagation

After adding your DNS records, verify they have propagated:
npx @wraps.dev/cli email domains verify -d yourapp.com
DNS propagation typically takes a few minutes but can take up to 48 hours depending on your provider. Run a full deliverability audit at any time:
npx @wraps.dev/cli email check yourapp.com
This checks DKIM, SPF, DMARC, MX TLS, blacklists, and DNS propagation.
New SES accounts start in sandbox mode. In sandbox mode you can only send to verified email addresses. To send to any recipient, request production access in the AWS SES console. Production access typically takes 24 hours.
5

Install the SDK

Install the @wraps.dev/email package in your application:
npm install @wraps.dev/email
6

Send your first email

import { WrapsEmail } from '@wraps.dev/email';

const email = new WrapsEmail({ region: 'us-east-1' });

const result = await email.send({
  from: '[email protected]',
  to: '[email protected]',
  subject: 'Welcome!',
  html: '<h1>Hello from Wraps!</h1>',
});

console.log('Sent:', result.messageId);
The SDK resolves AWS credentials using the default credential chain (environment variables → ~/.aws/credentials → IAM role). No extra configuration is needed if your environment already has AWS credentials.

Next steps

Email SDK reference

Send with React.Email templates, attachments, and bulk sending.

Deliverability guide

Run audits, check blacklists, and improve inbox placement.

Inbound email

Receive and process incoming email with wraps email inbound init.

OIDC for Vercel

Authenticate from Vercel without storing AWS credentials.

Build docs developers (and LLMs) love