Webmail System
BackIncoming emails land through a Cloudflare Email Worker that captures and routes them directly into the system, while all outgoing replies are sent via the Resend API. The interface is built around a conversation-threaded inbox where messages are grouped by thread and filtered into categories: regular emails, contact form submissions, archived threads, and sent items, each with live unread badges. Contact form messages get their own split-panel view with the original inquiry on one side and the reply editor on the other. The editor is a fully custom rich text solution with formatting controls, a text color picker, alignment, lists, blockquote, inline link and image insertion, and an edit and preview toggle that renders the actual email template before sending. Replies support file attachments, and composing a fresh email works with a chip-based multi-recipient input that handles comma or semicolon-separated addresses. Bulk selection and deletion, conversation archiving, full-text search, and paginated results keep the inbox manageable at any volume. On the security side, the whole application sits behind a superadmin-only session check via the central auth subdomain, with CSRF token rotation on every request and a strict HTML sanitizer that strips dangerous markup from incoming email content before it ever hits the screen.