feat: add email settings management

- Introduced EmailSettings component for managing SMTP services.
- Added API endpoints for organization email services including CRUD operations.
- Created database migrations for organization_email_settings and organization_email_services tables.
- Updated the settings page to include EmailSettings component.
- Implemented validation and error handling for email service operations.
This commit is contained in:
2026-04-15 09:33:50 -04:00
parent 44facf7f4a
commit e1d5975e57
12 changed files with 1877 additions and 18 deletions
+22
View File
@@ -65,6 +65,22 @@ services:
timeout: 5s
retries: 5
# ========================================
# SMTP Relay Interno (Mailpit)
# ========================================
mailpit:
image: axllent/mailpit:latest
container_name: openccb-mailpit
# SMTP para servicios internos y UI solo accesible por SSH túnel/localhost
ports:
- "127.0.0.1:8025:8025"
environment:
- MP_SMTP_BIND_ADDR=0.0.0.0:1025
- MP_UI_BIND_ADDR=0.0.0.0:8025
networks:
- openccb-network
restart: always
# ========================================
# Studio + CMS (HTTPS)
# ========================================
@@ -126,6 +142,12 @@ services:
- HOSTNAME=0.0.0.0
- DATABASE_URL=${LMS_DATABASE_URL}
- NEXT_PUBLIC_CMS_API_URL=${NEXT_PUBLIC_CMS_API_URL}
- SMTP_ENABLED=${SMTP_ENABLED:-false}
- SMTP_HOST=${SMTP_HOST:-mailpit}
- SMTP_PORT=${SMTP_PORT:-1025}
- SMTP_FROM=${SMTP_FROM:-OpenCCB <no-reply@norteamericano.com>}
- SMTP_USERNAME=${SMTP_USERNAME:-}
- SMTP_PASSWORD=${SMTP_PASSWORD:-}
env_file: .env
extra_hosts:
- "host.docker.internal:host-gateway"