Add dotenv package for environment variable management and refactor SMTP credential handling in email services. Enhance error handling for missing SMTP credentials across various API endpoints to improve reliability and maintainability.

This commit is contained in:
Torsten Schulz (local)
2025-12-18 12:19:23 +01:00
parent 1a093340ab
commit 680629e1f8
12 changed files with 492 additions and 95 deletions

View File

@@ -24,7 +24,7 @@ const SESSIONS_FILE = getDataPath('sessions.json')
// Get encryption key from environment
function getEncryptionKey() {
return process.env.ENCRYPTION_KEY || 'default-key-change-in-production'
return process.env.ENCRYPTION_KEY || 'local_development_encryption_key_change_in_production'
}
// Check if data is encrypted by trying to parse as JSON first