# Migration Guide

Source: https://wraps.dev/docs/guides/migration

Guide

Switch from SendGrid, Postmark, or Resend to Wraps. Side-by-side code comparisons, cost analysis, and step-by-step migration instructions.

## Why Migrate to Wraps?

-   Own your infrastructure
    
    Email infrastructure deploys to your AWS account. No middleman, no vendor lock-in.
    
-   $0.10 per 1,000 emails
    
    Pay AWS directly at transparent pricing. No markup, no surprise bills.
    
-   No vendor lock-in
    
    Infrastructure stays in your account even if you stop using Wraps. Your data is always yours.
    
-   Full data ownership
    
    Email logs, metrics, and sending data live in your AWS account with full data residency control.
    

## Migrating from SendGrid

Replace your SendGrid API key with OIDC-based authentication. No more managing API keys in environment variables.

SendGrid (before)

```
import sgMail from '@sendgrid/mail';sgMail.setApiKey(process.env.SENDGRID_API_KEY);await sgMail.send({  to: 'user@example.com',  from: 'hello@yourapp.com',  subject: 'Welcome!',  html: '<h1>Hello!</h1>',});
```

No more API keys

Wraps uses OIDC for authentication when deployed on Vercel, or IAM roles on AWS. No secrets to rotate or leak.

## Migrating from Postmark

Postmark uses different field names (PascalCase). Wraps uses a familiar camelCase API that matches modern JavaScript conventions.

Postmark (before)

```
import { ServerClient } from 'postmark';const client = new ServerClient(process.env.POSTMARK_SERVER_TOKEN);await client.sendEmail({  To: 'user@example.com',  From: 'hello@yourapp.com',  Subject: 'Welcome!',  HtmlBody: '<h1>Hello!</h1>',});
```

## Migrating from Resend

Resend and Wraps have a similar developer experience, but with Wraps the infrastructure lives in your AWS account at a fraction of the cost.

Resend (before)

```
import { Resend } from 'resend';const resend = new Resend(process.env.RESEND_API_KEY);await resend.emails.send({  to: 'user@example.com',  from: 'hello@yourapp.com',  subject: 'Welcome!',  html: '<h1>Hello!</h1>',});
```

Same great DX, you own the infra

The API is intentionally familiar. The difference is that your emails flow through infrastructure you own in your AWS account.

## Common Migration Steps

1.  1
    
    Deploy infrastructure
    
    terminal.sh
    
    ```
    npx @wraps.dev/cli email init
    ```
    
2.  2
    
    Add your domain
    
    terminal.sh
    
    ```
    npx @wraps.dev/cli email domains add -d yourdomain.com
    ```
    
3.  3
    
    Install the SDK
    
    terminal.sh
    
    ```
    npm install @wraps.dev/email
    ```
    
4.  4
    
    Update your send calls
    
    Swap your existing import and client initialization with the Wraps SDK as shown in the examples above.
    
5.  5
    
    Verify DNS (DKIM, SPF, DMARC)
    
    Configure your DNS records for email authentication. See the [domain verification guide](https://wraps.dev/docs/guides/domain-verification) for details.
    
6.  6
    
    Test and cutover
    
    Send a test email, verify delivery, then switch your production traffic to Wraps.
    

## Cost Comparison

Monthly cost by email volume. Wraps uses AWS SES pricing at $0.10 per 1,000 emails with no markup.

| Monthly Volume | SendGrid | Postmark | Resend | Wraps |
| --- | --- | --- | --- | --- |
| 10,000 | $19.95 | $15 | $20 | $1 |
| 50,000 | $19.95 | $50 | $20 | $5 |
| 100,000 | $34.95 | $100 | $80 | $10 |
| 500,000 | $249.95 | $500 | $380 | $50 |

## Next Steps

Email Quickstart

Follow the step-by-step quickstart to deploy infrastructure and send your first email.

[Get Started](https://wraps.dev/docs/quickstart/email)

Domain Verification

Set up DKIM, SPF, and DMARC to ensure reliable email delivery from your domain.

[Verify Domain](https://wraps.dev/docs/guides/domain-verification)
