Wraps Logo
DocsHome
Email Quickstart

Get Started with Email

Deploy production-ready email infrastructure to your AWS account in under 2 minutes and send your first email.

Before You Start: AWS Credentials Required

Every command below runs against your AWS account. Before running anything, make sure you have:

  • Node.js 20 or later installed
  • AWS credentials available to the CLI — AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables, a configured profile via aws configure, or an active aws sso login session
GNU Bashterminal.sh
# Option A: environment variablesexport AWS_ACCESS_KEY_ID=AKIA...export AWS_SECRET_ACCESS_KEY=...export AWS_REGION=us-east-1# Option B: AWS CLI profileaws configure# Option C: AWS SSOaws sso login

Missing credentials fail after the first prompt

If credentials aren't configured, the CLI still starts and asks its telemetry question before failing with a credentials error. Set up credentials first to avoid the confusing dead end.

What you'll build

  • Production-ready AWS SES with DKIM, SPF, and DMARC configured
  • A verified sending domain in your AWS account
  • Your first email sent via the TypeScript SDK

Time: ~2 minutes

1
Deploy Infrastructure

Run the Wraps CLI to deploy email infrastructure to your AWS account:

GNU Bashterminal.sh
npx @wraps.dev/cli email init

What happens during deployment?

  • Validates your AWS credentials
  • Prompts you to choose a configuration preset (Starter, Production, or Enterprise)
  • Shows estimated monthly AWS costs
  • Deploys SES, DynamoDB, Lambda, EventBridge, and IAM roles to your AWS account
  • Takes 1-2 minutes to complete

2
Install the TypeScript SDK

Install the @wraps.dev/email package:

npm install @wraps.dev/email

3
Send Your First Email

Create a new file and send an email using the SDK:

TypeScriptsend-email.ts
import { WrapsEmail } from '@wraps.dev/email';// Initialize the clientconst wraps = new WrapsEmail();// Send an emailconst result = await wraps.send({  from: 'hello@yourdomain.com',  to: 'user@example.com',  subject: 'Welcome to Wraps!',  html: '<h1>Hello from Wraps!</h1><p>This email was sent using AWS SES.</p>',});if (result.success) {  console.log('Email sent:', result.data.messageId);} else {  console.error('Failed to send email:', result.error);}

Note: Domain Verification

Before sending emails, you need to verify your domain with AWS SES. Run npx @wraps.dev/cli email domains verify -d yourdomain.com to check your DNS records and get setup instructions.

4
View Analytics (Optional)

Run the local dashboard to view email analytics and event tracking:

GNU Bashterminal.sh
npx @wraps.dev/cli dashboard

The dashboard will open at http://localhost:5555 where you can view email history, delivery rates, bounces, complaints, and more.

Next Steps

Email SDK Reference

Learn about all available methods, options, and advanced features.

View SDK Docs
CLI Commands

Explore all CLI commands for managing your infrastructure.

View CLI Docs

Need Help?

If you run into any issues, check our GitHub discussions or open an issue.

Get Help