Email System
Comprehensive email infrastructure for transactional and marketing communications in MyStoryFlow.
Overview
The email system handles all email communications across the platform, including:
- Transactional Emails - Account verification, password resets, notifications
- Campaign Emails - Story prompts, reminders, and updates
- Marketing Emails - Promotional content and newsletters
Documentation
User Guide
How to work with email templates and campaigns
Admin Guide
Administrative controls and monitoring
API Reference
Email API endpoints and integration
Setup & Configuration
Initial setup and configuration options
Quick Start
Sending Emails
The email system uses Resend as the email delivery provider:
import { sendEmail } from '@/lib/email';
await sendEmail({
to: 'user@example.com',
subject: 'Welcome to MyStoryFlow',
template: 'welcome',
data: { userName: 'John' }
});Email Templates
Templates are React components that render to HTML:
// templates/welcome.tsx
export function WelcomeEmail({ userName }) {
return (
<EmailLayout>
<h1>Welcome, {userName}!</h1>
<p>Start preserving your family stories today.</p>
</EmailLayout>
);
}