From 3db774d1fe5d43758514f57f784c3e24451f6a15 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 16 Feb 2021 21:29:53 +1100 Subject: [PATCH] Add docs for email backend --- _includes/config.yaml | 23 +++++++++++++++++++++++ docs/start/config.md | 20 +++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/_includes/config.yaml b/_includes/config.yaml index 18e3197..38b46f7 100644 --- a/_includes/config.yaml +++ b/_includes/config.yaml @@ -56,6 +56,29 @@ currencies: - NZD - USD +# Email backend configuration +# Ref: https://docs.djangoproject.com/en/dev/topics/email/ +# Available options: +# host: Email server host address +# port: Email port +# username: Account username +# password: Account password +# prefix: Email subject prefix +# tls: Enable TLS support +# ssl: Enable SSL support + +# Alternatively, these options can all be set using environment variables +# Refer to the InvenTree documentation for more information + +email: + host: '' + port: 25 + username: '' + password: '' + prefix: '[InvenTree] ' + tls: False + ssl: False + # Set debug to False to run in production mode debug: True diff --git a/docs/start/config.md b/docs/start/config.md index 6df457a..4159664 100644 --- a/docs/start/config.md +++ b/docs/start/config.md @@ -69,7 +69,7 @@ Database options are specified under the *database* heading in the configuration The following database options can be configured: -| Environment Variable | Settings File | Description | +| Environment Variable | COnfig File | Description | | --- | --- | --- | | INVENTREE_DB_ENGINE | database.ENGINE | Database backend | | INVENTREE_DB_NAME | database.NAME | Database name | @@ -121,6 +121,24 @@ It is then up to the database adminstrator to create a new PostgreSQL database t The database options (in the `config.yaml` file) then need to be adjusted to communicate the PostgreSQL backend. Refer to the [Django docs](https://docs.djangoproject.com/en/dev/ref/databases/) for further information. +### Email Backend + +InvenTree email settings must be correctly configured to allow sending emails. + +Email options are specified under the *email* heading in the configuration file. Alternatively email settings can be set via environment variables. + +The following email options can be configured: + +| Environment Variable | Config File | Description | +| --- | --- | --- | +| INVENTREE_EMAIL_HOST | email.host | Email service host address | +| INVENTREE_EMAIL_PORT | email.port | Email service host port | +| INVENTREE_EMAIL_USERNAME | email.username | Account username | +| INVENTREE_EMAIL_PASSWORD | email.password | Account password | +| INVENTREE_EMAIL_PREFIX | email.prefix | Email subject prefix - default is "[InvenTree] " | +| INVENTREE_EMAIL_TLS | email.tls | Enable TLS support | +| INVENTREE_EMAIL_SSL | email.ssl | Enable SSL support | + ### Allowed Hosts / CORS By default, all hosts are allowed, and CORS requests are enabled from any origin. **This is not secure and should be adjusted for your installation**. These options can be changed in the configuration file.