Wraps Logo
Email Quickstart

Get Started with Email

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

Prerequisites

Before you begin, make sure you have:

  • Node.js 20 or later installed
  • An AWS account with valid credentials configured
  • AWS CLI installed and configured (or AWS credentials in environment variables)

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 { Wraps } from '@wraps.dev/email';// Initialize the clientconst wraps = new Wraps();// Send an emailconst result = await wraps.emails.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