From d7caddb1356c1cd129924299a48664cb52408e93 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 7 Dec 2025 00:13:45 +1100 Subject: [PATCH] Update email docs (#10966) * Map shorthand email backends * Revert settings changes * Update email docs * Tweak docs --- docs/docs/start/config.md | 4 ++++ src/backend/InvenTree/InvenTree/settings.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/docs/docs/start/config.md b/docs/docs/start/config.md index 656c44e98a..7e68bf0452 100644 --- a/docs/docs/start/config.md +++ b/docs/docs/start/config.md @@ -342,6 +342,10 @@ The following email settings are available: | INVENTREE_EMAIL_SENDER | email.sender | Sending email address | *Not specified* | | INVENTREE_EMAIL_PREFIX | email.prefix | Prefix for subject text | [InvenTree] | +### Email Backend + +The default email implementation uses the Django STMP backend. This should be sufficient for most implementations, although other backends can be used if required. Note that selection of a different backend requires must use fully qualified module path, and requires advanced knowledge. + ### Sender Email The "sender" email address is the address from which InvenTree emails are sent (by default) and must be specified for outgoing emails to function: diff --git a/src/backend/InvenTree/InvenTree/settings.py b/src/backend/InvenTree/InvenTree/settings.py index 17585f7bf9..747f946779 100644 --- a/src/backend/InvenTree/InvenTree/settings.py +++ b/src/backend/InvenTree/InvenTree/settings.py @@ -1017,11 +1017,13 @@ EXCHANGE_BACKEND = 'InvenTree.exchange.InvenTreeExchange' # region email # Email configuration options EMAIL_BACKEND = 'InvenTree.backends.InvenTreeMailLoggingBackend' + INTERNAL_EMAIL_BACKEND = get_setting( 'INVENTREE_EMAIL_BACKEND', 'email.backend', 'django.core.mail.backends.smtp.EmailBackend', ) + # SMTP backend EMAIL_HOST = get_setting('INVENTREE_EMAIL_HOST', 'email.host', '') EMAIL_PORT = get_setting('INVENTREE_EMAIL_PORT', 'email.port', 25, typecast=int)