Add staff email client with WebSocket real-time updates

Implements a complete email client for platform staff members:

Backend:
- Add routing_mode field to PlatformEmailAddress (PLATFORM/STAFF)
- Create staff_email app with models for folders, emails, attachments, labels
- IMAP service for fetching emails with folder mapping
- SMTP service for sending emails with attachment support
- Celery tasks for periodic sync and full sync operations
- WebSocket consumer for real-time notifications
- Comprehensive API viewsets with filtering and actions

Frontend:
- Thunderbird-style three-pane email interface
- Multi-account support with drag-and-drop ordering
- Email composer with rich text editor
- Email viewer with thread support
- Real-time WebSocket updates for new emails and sync status
- 94 unit tests covering models, serializers, views, services, and consumers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
poduck
2025-12-18 01:50:40 -05:00
parent 7b380fa903
commit 18eeda62e8
62 changed files with 8943 additions and 410 deletions

View File

@@ -4041,5 +4041,49 @@
"description": "Can't find what you're looking for? Our support team is ready to help.",
"contactSupport": "Contact Support"
}
},
"staffEmail": {
"title": "Staff Email",
"compose": "Compose",
"inbox": "Inbox",
"sent": "Sent",
"drafts": "Drafts",
"trash": "Trash",
"archive": "Archive",
"spam": "Spam",
"folders": "Folders",
"labels": "Labels",
"noEmails": "No emails",
"selectEmail": "Select an email to read",
"searchPlaceholder": "Search emails...",
"reply": "Reply",
"replyAll": "Reply All",
"forward": "Forward",
"markAsRead": "Mark as read",
"markAsUnread": "Mark as unread",
"star": "Star",
"unstar": "Unstar",
"moveToTrash": "Move to trash",
"delete": "Delete",
"restore": "Restore",
"send": "Send",
"saveDraft": "Save draft",
"discard": "Discard",
"to": "To",
"cc": "Cc",
"bcc": "Bcc",
"subject": "Subject",
"from": "From",
"date": "Date",
"attachments": "Attachments",
"clickToReply": "Click here to reply...",
"newMessage": "New Message",
"emailSent": "Email sent",
"draftSaved": "Draft saved",
"emailArchived": "Email archived",
"emailTrashed": "Email moved to trash",
"emailRestored": "Email restored",
"syncComplete": "Emails synced",
"syncFailed": "Failed to sync emails"
}
}