feat(13-email-mailboxes): phase 13 complete — email DB foundation + SMTP mailbox CRUD

3 migrations (email_mailboxes, email_templates, email_logs), full CRUD
for SMTP mailboxes with encrypted passwords (IntegrationSecretCipher),
native SMTP connection test via stream_socket_client, sidebar navigation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-15 23:57:33 +01:00
parent 8b3fb3fd0b
commit 3223aac4d9
16 changed files with 1257 additions and 19 deletions

View File

@@ -0,0 +1,13 @@
CREATE TABLE IF NOT EXISTS `email_templates` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(200) NOT NULL,
`subject` VARCHAR(500) NOT NULL,
`body_html` TEXT NOT NULL,
`mailbox_id` INT UNSIGNED DEFAULT NULL,
`is_active` TINYINT(1) NOT NULL DEFAULT 1,
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_email_templates_mailbox` (`mailbox_id`),
CONSTRAINT `fk_email_templates_mailbox` FOREIGN KEY (`mailbox_id`) REFERENCES `email_mailboxes` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;