A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Allow users to configure the DEFAULT_FROM_EMAIL but default to the EMAIL_HOST_USER if not set (#4867)
Trenton H18a9a3df1235
diff --git a/docs/configuration.md b/docs/configuration.mdindex c0e8022ac..87d992443 100644--- a/docs/configuration.md+++ b/docs/configuration.md@@ -1345,6 +1345,10 @@ password. All of these options come from their similarly-named [Django settings]: Defaults to ''.+#### [`PAPERLESS_EMAIL_FROM=<str>`](#PAPERLESS_EMAIL_FROM) {#PAPERLESS_EMAIL_FROM}++: Defaults to PAPERLESS_EMAIL_HOST_USER if not set.+#### [`PAPERLESS_EMAIL_HOST_PASSWORD=<str>`](#PAPERLESS_EMAIL_HOST_PASSWORD) {#PAPERLESS_EMAIL_HOST_PASSWORD}: Defaults to ''.diff --git a/src/paperless/settings.py b/src/paperless/settings.pyindex 9daeb8a47..30986aaa0 100644--- a/src/paperless/settings.py+++ b/src/paperless/settings.py@@ -1036,6 +1036,7 @@ EMAIL_HOST: Final[str] = os.getenv("PAPERLESS_EMAIL_HOST", "localhost")EMAIL_PORT: Final[int] = int(os.getenv("PAPERLESS_EMAIL_PORT", 25))EMAIL_HOST_USER: Final[str] = os.getenv("PAPERLESS_EMAIL_HOST_USER", "")EMAIL_HOST_PASSWORD: Final[str] = os.getenv("PAPERLESS_EMAIL_HOST_PASSWORD", "")+DEFAULT_FROM_EMAIL: Final[str] = os.getenv("PAPERLESS_EMAIL_FROM", EMAIL_HOST_USER)EMAIL_USE_TLS: Final[bool] = __get_boolean("PAPERLESS_EMAIL_USE_TLS")EMAIL_USE_SSL: Final[bool] = __get_boolean("PAPERLESS_EMAIL_USE_SSL")EMAIL_SUBJECT_PREFIX: Final[str] = "[Paperless-ngx] "