Email System
Customizable transactional emails with React Email templates
ProStack includes a complete email system for sending transactional emails using React Email templates and Resend as the delivery provider.
Email Features
- Customizable Templates: All emails are built with React components
- Responsive Design: Emails look great on all devices
- Branding Control: Easy customization of colors, logos, and content
- Internationalization: Support for multiple languages
- Delivery Tracking: Email delivery and open rates (via Resend)
Email Types
ProStack includes several pre-built email templates for common use cases:
Authentication Emails
- Email Verification: Sent when a new user signs up (if enabled)
- Password Reset: Sent when a user requests a password reset
Organization Emails
- Team Invitation: Sent when a user is invited to join an organization
Marketing Emails
- Waitlist Confirmation: Sent when a user joins the waitlist
How Emails Work
ProStack uses React Email for building email templates and Resend for delivery:
Email Components
All email templates are built using reusable components found in components/mails/mail-components.tsx
:
Component | Description |
---|---|
MailContainer | Container for the entire email |
MailBody | Email body with proper styling |
MailTitle | Title/heading for the email |
MailText | Paragraph text with proper styling |
MailButton | Call-to-action button |
MailFooterText | Footer text with smaller size |
Customizing Emails
You can customize the email templates to match your brand:
1. Update Email Templates
Modify the React components in components/mails/
to change the content and design:
2. Update Site Configuration
Update the email settings in resources/site.ts
:
Email Integration Points
The email system is integrated with several features in ProStack:
Authentication Integration
Emails are sent at key points in the authentication flow:
Organization Integration
Emails are sent when users are invited to organizations:
Waitlist Integration
Emails are sent when users join the waitlist:
Email Testing
During development, email sending is logged to the console rather than actually sent (unless in production mode). This allows you to see the content of emails without sending real messages.
To test emails in development:
- Check your console logs to see email content and recipients
- For testing real email delivery, use Resend’s test mode or set up a development API key
Environment Variables
Configure the email system with these environment variables:
Variable | Description | Required |
---|---|---|
RESEND_API_KEY | Resend API key for sending emails | Yes |
RESEND_EMAILS_DOMAIN | Domain for sending emails with Resend | Recommended |
Next Steps
Was this page helpful?