# Email System Documentation
Name: {{name}}
Email: {{email}}
Subject: {{subject}}
{{message}}
Submitted on {{date_format submitted_at}}
``` **Text Template (contact.hbs):** ```text Contact Form Submission Name: {{name}} Email: {{email}} Subject: {{subject}} Message: {{message}} --- Submitted on {{date_format submitted_at}} ``` ## API Endpoints ### GET /api/email/status Get email service status and available templates. **Response:** ```json { "enabled": true, "provider": "smtp", "configured": true, "templates": ["contact_html", "contact_text", "notification_html"] } ``` ### POST /api/email/contact Submit a contact form. **Request:** ```json { "name": "John Doe", "email": "john@example.com", "subject": "Question about pricing", "message": "I'd like to know more about your plans.", "recipient": "admin@yourapp.com" } ``` **Response:** ```json { "message": "Contact form submitted successfully", "message_id": "smtp-1234567890", "status": "sent" } ``` ### POST /api/email/support Submit a support form with priority and category. **Request:** ```json { "name": "Jane Smith", "email": "jane@example.com", "subject": "Login issues", "message": "I can't log into my account.", "priority": "high", "category": "technical", "recipient": "support@yourapp.com" } ``` ### POST /api/email/send Send a custom email (admin only). **Request:** ```json { "to": "user@example.com", "subject": "Welcome to our service", "template": "welcome", "template_data": { "user_name": "John", "activation_link": "https://app.com/activate/123" } } ``` ### POST /api/email/notification Send a notification email. **Request:** ```json { "to": "user@example.com", "title": "Account Verification", "message": "Please verify your email address", "content": "Click the link below to verify...
" } ``` ## Client Components ### ContactForm Component ```jsx import { ContactForm } from './components/forms';"We'd love to hear from you. Send us a message and we'll respond as soon as possible."