---
title: "Email with Resend"
description: "Connect Resend for email notifications, learn what an environment variable is, and redeploy so both the database and email integrations work together."
canonical_url: "https://vercel.com/academy/v0-foundations/handling-email-with-resend"
md_url: "https://vercel.com/academy/v0-foundations/handling-email-with-resend.md"
docset_id: "vercel-academy"
doc_version: "1.0"
last_updated: "2026-05-12T20:51:23.950Z"
content_type: "lesson"
course: "v0-foundations"
course_title: "v0 Foundations"
prerequisites:  []
---

<agent-instructions>
Vercel Academy — structured learning, not reference docs.
Lessons are sequenced.
Adapt commands to the human's actual environment (OS, package manager, shell, editor) — detect from project context or ask, don't assume.
The lesson shows one path; if the human's project diverges, adapt concepts to their setup.
Preserve the learning goal over literal steps.
Quizzes are pedagogical — engage, don't spoil.
Quiz answers are included for your reference.
</agent-instructions>

# Email with Resend

# Email with Resend

The database is great, but it's a pull system. Someone has to remember to check it. A real plant shop owner wants to know *when* a message comes in, not whenever they get around to opening the dashboard.

That's email's job. Specifically, Resend's job.

## Get a Resend API key

Head to [resend.com](https://resend.com) and log in (or sign up if it's your first time). The first thing you want is an API key.

Click **Add API Key**, name it something like `green-thumb-goods`, and copy the value. That string is your credential. It's how Resend knows requests are coming from you and not someone pretending to be you.

## Tell v0 about the key

Back in v0:

```
okay, I have a Resend API key now. Where do I put it?
```

v0 will surface a field for the key and ask for a contact email, the inbox where notifications should land. Paste the key, drop in your email, hit submit.

Behind the scenes, v0 just added an **environment variable** to your project. That's a fancy term for a small piece of configuration that lives outside your code.

\*\*Note: What's an environment variable?\*\*

Think of it as a little key that lets two services work together. You have a key from Resend. You hand it to v0. Now v0 can talk to Resend on your behalf, without anyone exposing the key in the site itself.

## Redeploy after adding env vars

Anytime you change an environment variable, you need to publish a fresh deployment for it to take effect. Click **Update** to push a new production deploy.

This step is easy to forget and confusing when you do. If your email notifications aren't working after setup, the redeploy is the first thing to check.

## Test the full loop

Head to your live site and submit a real (well, real-ish) message:

```
Email: fake@reallyfake.com
Message: test message to see if email notifications are working.
```

Three things should happen:

1. The site shows a "message sent" confirmation.
2. The message appears in your Supabase **contact\_messages** table when you refresh.
3. An email arrives in your inbox with the submission details.

If the email shows up, the whole loop works: form to database to inbox.

## Recap

- **API keys** identify your account when one service talks to another.
- **Environment variables** store credentials safely outside your code.
- **Redeploy** after changing environment variables.
- **Test end to end** (site, database, email) to confirm everything's wired up.


---

[Full course index](/academy/llms.txt) · [Sitemap](/academy/sitemap.md)
