The site now reaches into the real world and lands in someone's inbox. It feels like a real company.

The automatic welcome email, landing in a real inbox.
Concepts
- Transactional email = automatic emails triggered by an action (welcome, receipt, reset).
- Resend is an email API: your backend asks it to send a message.
- Domain verification: to send "from" your own address, you prove you own the domain. (Instructor handles this once.)
- This happens in the backend, right after the signup is saved.
Talking points
- Your site can now email people automatically.
- The email send happens on the backend, right after we save the signup.
- Resend needs a verified domain to send as "you" — that's anti-spam, not bureaucracy.
- Free tier = 100 emails/day, 3,000/month. Way more than a class needs.
Live demo (I do)
- Show the (pre-verified, instructor-owned) Resend setup and where the API key goes (
.env, same hygiene as Module 4). - Have Claude add an email send to the signup API route: after saving, send a welcome email.
- Sign up live with your own address; show the email arrive on the projector.
Student activity (you do)
Students add a confirmation email to their signup flow and write the email's wording for their club. Goal: sign up and receive a real email.
Copy-paste prompts
After a signup is saved in my API route, send a welcome email using
Resend to the address they entered. Put the Resend API key in .env.
The email should welcome them to "[their club]" and say what happens
next. Show me how to test it.
Make the welcome email look nicer with a simple HTML template:
a heading, a short friendly message, and the club name. Keep it
clean and readable on phones.
Where it breaks
- Emails land in spam / don't send without a verified domain. That's why this is instructor-owned and set up once in advance.
- Daily limit (100/day). A class of 20 all testing repeatedly can brush it. Stagger testing or use the instructor account thoughtfully.
- Leaked API key (again). Same
.envdiscipline. Rotate if exposed. - Sending to fake/typo addresses. Tie back to Module 5 validation.
Check for understanding
- What's a transactional email? Give an example you've received.
- Why does Resend require domain verification?
- Where in the flow does the email get sent?
Stretch
Also send yourself (the club owner) a notification email for each new signup. Two emails, one event.
For the instructor
Pre-verify your domain and have the Resend key ready before class — domain verification involves DNS records and can take time to propagate; you do not want 20 teens waiting on DNS. Consider providing the key via your run model rather than each student making a Resend account.
