Enhance SMTP configuration in docker-compose and email handler

- Updated docker-compose.yml to include optional SMTP settings with comments for clarity on configuration.
- Modified email-handler.ts to prioritize FROM_EMAIL for the sender address, falling back to SMTP_USER or ADMIN_EMAIL if not set, improving email handling flexibility.
This commit is contained in:
2025-11-18 22:44:58 +01:00
parent 6cd45c254b
commit 6fa07b4b63
4 changed files with 20 additions and 6 deletions

View File

@@ -14,12 +14,19 @@ services:
- NODE_ENV=production
- PORT=3000
- ENABLE_SSR_CSP=1
# Add your other environment variables here
# SMTP Settings - Loaded from .env file or set here
# Uncomment and set these if not using .env file:
# - SMTP_HOST=smtp.your-server.com
# - SMTP_PORT=587
# - SMTP_USER=your-email@domain.com
# - SMTP_PASS=your-password
# - FROM_EMAIL=support@365devnet.eu # Optional: Custom "from" address
# - ADMIN_EMAIL=admin@365devnet.eu
# - WEBSITE_NAME=365DevNet
# Other settings
# - GEMINI_API_KEY=${GEMINI_API_KEY}
# - EMAIL_USER=${EMAIL_USER}
# - EMAIL_PASS=${EMAIL_PASS}
env_file:
- .env
- .env # SMTP settings will be loaded from this file
volumes:
# Mount logs directory if you want to persist logs
- ./logs:/app/logs