Cursor Prompt: Add Email Sending with Resend
When to Use This Prompt
Use this when your app needs to send transactional emails. Resend is the simplest modern email API.
The Prompt
Add email functionality to this app using Resend: 1. Install and configure Resend SDK 2. Create email templates using React Email: - Welcome email (after signup) - Password reset email - Order confirmation email - Weekly digest email 3. Create an API route /api/send-email that handles sending 4. Add proper error handling and retry logic 5. Store email send history in the database 6. Add rate limiting to prevent abuse Resend API key should be in environment variables. Emails should be responsive and work in all major email clients.
What to Customize
Adjust the email templates to match your use case. Add or remove template types as needed.
Expected Output
Email templates as React components, API route for sending, and database schema for send history. Usually 6-8 files.