fix(email): create missing email template and decouple email destination settings

- Create app/templates/email/default.html (fixes 'default.html not found' error)
- Add DEST_EMAIL_* settings to app/config.py (decoupled from shared EMAIL_* settings)
- Update upload_to_email task to use dest_email_* settings exclusively
- Update _should_upload_to_email() to check dest_email_* settings
- Update config validator, providers, and settings_service for dest_email_*
- Update .env.demo and docs/ConfigurationGuide.md
- Update all tests to use dest_email_* settings where appropriate"

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-08 10:10:18 +00:00
parent 4857203d08
commit 58c9b5d7f0
14 changed files with 260 additions and 82 deletions
+7 -7
View File
@@ -364,12 +364,12 @@ def test_upload_to_email_accepts_file_id(sample_text_file):
patch("app.tasks.upload_to_email.attach_logo") as mock_logo,
):
# Setup settings
mock_settings.email_host = "smtp.example.com"
mock_settings.email_port = 587
mock_settings.email_username = "test@example.com"
mock_settings.email_password = _TEST_CREDENTIAL
mock_settings.email_use_tls = True
mock_settings.email_sender = "sender@example.com"
mock_settings.dest_email_host = "smtp.example.com"
mock_settings.dest_email_port = 587
mock_settings.dest_email_username = "test@example.com"
mock_settings.dest_email_password = _TEST_CREDENTIAL
mock_settings.dest_email_use_tls = True
mock_settings.dest_email_sender = "sender@example.com"
mock_settings.external_hostname = "docuelevate.example.com"
# Setup mocks
@@ -503,7 +503,7 @@ def test_send_to_all_calls_upload_tasks_with_keyword_argument():
mock_settings.webdav_url = None
mock_settings.ftp_host = None
mock_settings.sftp_host = None
mock_settings.email_host = None
mock_settings.dest_email_host = None
mock_settings.onedrive_client_id = None
mock_settings.workdir = "/tmp"