From fc9515cf5dbebd28cc3afdcd4d30b443e8df8b6a Mon Sep 17 00:00:00 2001 From: Tiho0135 Date: Wed, 19 Feb 2025 09:57:41 +0100 Subject: [PATCH 1/5] Adding email timeout env variable --- src/openforms/conf/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openforms/conf/base.py b/src/openforms/conf/base.py index 1c4d04217a..8235bc1b40 100644 --- a/src/openforms/conf/base.py +++ b/src/openforms/conf/base.py @@ -362,7 +362,7 @@ EMAIL_HOST_USER = config("EMAIL_HOST_USER", default="") EMAIL_HOST_PASSWORD = config("EMAIL_HOST_PASSWORD", default="") EMAIL_USE_TLS = config("EMAIL_USE_TLS", default=False) -EMAIL_TIMEOUT = 10 +EMAIL_TIMEOUT = config("EMAIL_TIMEOUT", default=10) DEFAULT_FROM_EMAIL = config("DEFAULT_FROM_EMAIL", "openforms@example.com") From 507b960ecb1ff7b96457ae2e297d63983eb1790b Mon Sep 17 00:00:00 2001 From: Tiho0135 Date: Mon, 24 Feb 2025 15:44:08 +0100 Subject: [PATCH 2/5] Adding documentation info to the changelog --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a7506123b0..b3c5965489 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -49,6 +49,8 @@ Detailed changes configuration. * [:backend:`4785`] Updated the eHerkenning metadata generation to match the latest standard version(s). +* Added the ability to configure ``EMAIL_TIMEOUT`` environment variable which will configure +the time after which the email service will timeout. **Bugfixes** From 0d3e4b6e52b61d77e9a9923f6bf6e3ab7a215707 Mon Sep 17 00:00:00 2001 From: Tiho0135 Date: Wed, 26 Feb 2025 11:26:07 +0100 Subject: [PATCH 3/5] Adding documentation to the installation/config file --- CHANGELOG.rst | 2 +- docs/installation/config.rst | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b3c5965489..4401c40282 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -50,7 +50,7 @@ Detailed changes * [:backend:`4785`] Updated the eHerkenning metadata generation to match the latest standard version(s). * Added the ability to configure ``EMAIL_TIMEOUT`` environment variable which will configure -the time after which the email service will timeout. +the time after which the email service will timeout. **Bugfixes** diff --git a/docs/installation/config.rst b/docs/installation/config.rst index d016a3223b..5e3fd8937a 100644 --- a/docs/installation/config.rst +++ b/docs/installation/config.rst @@ -83,6 +83,8 @@ Email settings * ``DEFAULT_FROM_EMAIL``: The email address to use a default sender. Defaults to ``openforms@example.com``. +* ``EMAIL_TIMEOUT``: in seconds this variable is setting the maximum amount of time the email backend will wait when trying to connect to the email server. If the connection exceeds the time specified a timout error will be raised. The default value is set to ``10 seconds``, and in general it is not recommended to use a very high number. This setting ensures that any email-sending operation will fail quickly if the server doesn't respond within the given timeframe. + .. _installation_config_cors: Cross-Origin Resource Sharing (CORS) settings From 1db01e62505254d786e8d9574d3e339a7fb7ac23 Mon Sep 17 00:00:00 2001 From: Tiho0135 Date: Wed, 26 Feb 2025 11:31:18 +0100 Subject: [PATCH 4/5] Removing wrongly added info to changelog doc --- CHANGELOG.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4401c40282..a7506123b0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -49,8 +49,6 @@ Detailed changes configuration. * [:backend:`4785`] Updated the eHerkenning metadata generation to match the latest standard version(s). -* Added the ability to configure ``EMAIL_TIMEOUT`` environment variable which will configure -the time after which the email service will timeout. **Bugfixes** From 304fc127d1413b6aba589eec112b69d12d32a321 Mon Sep 17 00:00:00 2001 From: Tiho0135 Date: Wed, 26 Feb 2025 11:34:13 +0100 Subject: [PATCH 5/5] Update docs/installation/config.rst to correct text Co-authored-by: Sergei Maertens --- docs/installation/config.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation/config.rst b/docs/installation/config.rst index 5e3fd8937a..05111ecf81 100644 --- a/docs/installation/config.rst +++ b/docs/installation/config.rst @@ -83,7 +83,7 @@ Email settings * ``DEFAULT_FROM_EMAIL``: The email address to use a default sender. Defaults to ``openforms@example.com``. -* ``EMAIL_TIMEOUT``: in seconds this variable is setting the maximum amount of time the email backend will wait when trying to connect to the email server. If the connection exceeds the time specified a timout error will be raised. The default value is set to ``10 seconds``, and in general it is not recommended to use a very high number. This setting ensures that any email-sending operation will fail quickly if the server doesn't respond within the given timeframe. +* ``EMAIL_TIMEOUT``: How long to wait for blocking operations like the connection attempt, in seconds. Defaults to ``10``. .. _installation_config_cors: