> ## Documentation Index
> Fetch the complete documentation index at: https://help.emergent.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Resend Integration

> Send beautiful emails with Resend

## What is Resend?

Resend is a modern email service built for developers. It makes sending emails (like welcome emails, password resets, receipts) super simple and reliable.

**Perfect for:**

* Welcome emails when users sign up
* Password reset emails
* Order confirmations
* Notifications
* Any transactional emails

## What You'll Need

<Steps>
  <Step title="Resend Account">
    Create account at [resend.com](https://resend.com) - free to start!
  </Step>

  <Step title="Verify Domain">
    Add your domain (or use their test email)
  </Step>

  <Step title="API Key">
    Get your API key
  </Step>
</Steps>

## Step 1: Get Your Resend API Key

### Create Account

1. Go to [resend.com](https://resend.com)
2. Click **Start Building**
3. Sign up with email or GitHub
4. Verify your email

### Get API Key

1. Go to [Dashboard](https://resend.com/dashboard)
2. Click **API Keys**
3. Click **Create API Key**
4. Give it a name (like "Production")
5. Click **Create**
6. **Copy the key immediately!** (You can't see it again)

<Warning>
  \*\*Save your API key now - \*\*It's only shown once and you can't retrieve it later.
</Warning>

### For Testing: Use Their Email

<Note>
  For testing, you can send from `onboarding@resend.dev` - no domain setup needed!

  For production, you'll need to verify your own domain.
</Note>

## Step 2: Tell the Agent What You Want

Just describe what emails you need! Here are examples:

### Example 1: Welcome Emails

```
I need to send welcome emails when users sign up.

Resend API key: [paste your key]

The email should:
- Say "Welcome!" with their name
- Have a button to go to the dashboard
- Look professional

Send from: noreply@yourdomain.com
(Or use onboarding@resend.dev for testing)

Please set this up.
```

### Example 2: Password Reset

```
I need password reset emails.

Resend API key: [paste your key]

The email should:
- Have a "Reset Password" button
- Link expires in 1 hour
- Friendly message

Send from: noreply@yourdomain.com

Please build this.
```

### Example 3: Order Confirmations

```
Send order confirmation emails after purchase.

Resend API key: [paste your key]

Include:
- Order number
- Items purchased
- Total price
- Estimated delivery
- "View Order" button

Send from: orders@yourdomain.com

Please set this up.
```

<Tip>
  \*\*That's all you need - \*\*The agent will create the emails and set up everything.
</Tip>

## Step 3: Test Your Emails

After the agent sets it up:

<Steps>
  <Step title="Click Preview">
    In Emergent, click **Preview**
  </Step>

  <Step title="Trigger an Email">
    Do whatever sends the email (like sign up)
  </Step>

  <Step title="Check Your Inbox">
    You should receive the email!
  </Step>

  <Step title="Test the Links">
    Click any buttons/links to make sure they work
  </Step>

  <Step title="Check It Looks Good">
    Make sure it looks professional
  </Step>
</Steps>

## Step 4: Go Live with Your Domain

For production, verify your domain:

<Steps>
  <Step title="Go to Domains">
    In Resend Dashboard → **Domains**
  </Step>

  <Step title="Add Domain">
    Click **Add Domain**

    Enter your domain (like `yourdomain.com`)
  </Step>

  <Step title="Add DNS Records">
    Copy the DNS records Resend gives you

    Add them to your domain provider (like GoDaddy, Namecheap)
  </Step>

  <Step title="Verify">
    Click **Verify** in Resend

    May take up to 48 hours
  </Step>

  <Step title="Update Your App">
    Tell the agent:

    ```
    Change the email sender to noreply@yourdomain.com
    (now that my domain is verified)
    ```
  </Step>
</Steps>

## Common Questions

<AccordionGroup>
  <Accordion title="How much does Resend cost?">
    **Free tier:** 100 emails per day, forever!

    **Paid plans:**

    * Pro: \$20/month for 50,000 emails
    * More: Custom pricing
  </Accordion>

  <Accordion title="Can I customize the email design?">
    Yes! Tell the agent:

    ```
    Make the welcome email:
    - Use my brand colors (blue #3B82F6)
    - Add my logo
    - Make it look more modern
    ```
  </Accordion>

  <Accordion title="Emails going to spam. How do I fix?">
    Tell the agent:

    ```
    My emails are going to spam. Can you:
    1. Make sure domain is verified
    2. Add unsubscribe link
    3. Improve email content to avoid spam triggers
    ```
  </Accordion>

  <Accordion title="Can I track if emails were opened?">
    Yes! Tell the agent:

    ```
    I want to track:
    - If emails were delivered
    - If they were opened
    - If links were clicked

    Please add email tracking.
    ```
  </Accordion>
</AccordionGroup>

## Something Not Working?

### Emails Not Sending

**Tell the agent:**

```
Emails aren't sending. I see this error:
[paste the error]

Can you fix it?
```

### Wrong Sender Email

**Tell the agent:**

```
Emails show wrong sender address.
Should be: noreply@mysite.com
Please update it.
```

### Email Looks Broken

**Tell the agent:**

```
The email doesn't look right on mobile.
Can you make it responsive?
```

## Real Examples

### Example 1: Complete Auth Emails

```
I need all authentication emails:

1. Welcome email (when they sign up)
2. Email verification (with link to verify)
3. Password reset (with reset link)
4. Password changed confirmation

Resend API key: [paste key]
Send from: noreply@myapp.com

Make them all professional and friendly.

Please set these up.
```

### Example 2: E-commerce Emails

```
I need order-related emails:

1. Order confirmation (with order details)
2. Shipping notification (with tracking link)
3. Delivery confirmation

Include:
- Order items and prices
- Customer name
- Order number
- Nice buttons

Resend API key: [paste key]

Please build this.
```

## Quick Checklist

Before going live:

* Tested all email types
* Emails arrive in inbox (not spam)
* All links work
* Looks good on mobile
* Domain is verified (for production)
* Changed from test email to your domain

## Remember

**Use test email for development** - `onboarding@resend.dev`

**Verify your domain for production** - Required for real emails

**Free tier is great** - 100 emails/day

**Test everything** - Check emails before launch

<Info>
  Stuck? Tell the agent: "I need help with my Resend emails" and describe the issue.
</Info>
