Skip to content

Commit 47c5d9e

Browse files
committed
update email settings for SSL
1 parent b7e3ef0 commit 47c5d9e

File tree

1 file changed

+78
-18
lines changed

1 file changed

+78
-18
lines changed

docs/configuration/sending-email.md

Lines changed: 78 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ There are two ways to configure this SMTP account for system wide emails.
2828
| `SEATABLE_DEFAULT_FROM_EMAIL` | Used for `From:` | `[email protected]` |
2929
| `SEATABLE_SERVER_EMAIL` | Used for `From:` in case of error reporting | `[email protected]` |
3030

31+
See the examples at the end of this article for easy copy-and-paste use.
32+
3133
=== "Configuration file"
3234

3335
Add the following lines to `dtable_web_settings.py` to enable email sending.
@@ -46,6 +48,11 @@ There are two ways to configure this SMTP account for system wide emails.
4648

4749
If you want to use the email service without authentication, leave `EMAIL_HOST_USER` and `EMAIL_HOST_PASSWORD` **blank** (`''`).
4850

51+
!!! warning "SSL (instead of TLS) is not yet supported via environment variable"
52+
53+
If you mail provider requires SSL instead of TLS, you need to configure your SMTP Settings via the configuration file `dtable_web_settings.py`.
54+
SSL can not be set via environment variable.
55+
4956
Restart SeaTable service to reload the changes.
5057

5158
## Debugging
@@ -55,6 +62,7 @@ Otherwise use a command line tool like [Swaks](https://github.com/jetmore/swaks)
5562

5663
```bash
5764
# example of a swaks command to verify your settings
65+
# (use -tls for TLS and -tlsc for SSL)
5866
swaks --auth -tls \
5967
--server <EMAIL_HOST> \
6068
--protocol SMTP \
@@ -73,15 +81,29 @@ swaks --auth -tls \
7381

7482
If you are using Gmail as email server, you can use the following settings.
7583

76-
```python
77-
EMAIL_USE_TLS = True
78-
EMAIL_HOST = 'smtp.gmail.com'
79-
EMAIL_HOST_USER = '[email protected]'
80-
EMAIL_HOST_PASSWORD = 'password'
81-
EMAIL_PORT = 587
82-
DEFAULT_FROM_EMAIL = '[email protected]'
83-
SERVER_EMAIL = '[email protected]'
84-
```
84+
=== "Environment variables"
85+
86+
```python
87+
SEATABLE_EMAIL_USE_TLS = True
88+
SEATABLE_EMAIL_HOST = 'smtp.gmail.com'
89+
SEATABLE_EMAIL_HOST_USER = '[email protected]'
90+
SEATABLE_EMAIL_HOST_PASSWORD = 'password'
91+
SEATABLE_EMAIL_PORT = 587
92+
SEATABLE_DEFAULT_FROM_EMAIL = '[email protected]'
93+
SEATABLE_SERVER_EMAIL = '[email protected]'
94+
```
95+
96+
=== "Configuration file"
97+
98+
```python
99+
EMAIL_USE_TLS = True
100+
EMAIL_HOST = 'smtp.gmail.com'
101+
EMAIL_HOST_USER = '[email protected]'
102+
EMAIL_HOST_PASSWORD = 'password'
103+
EMAIL_PORT = 587
104+
DEFAULT_FROM_EMAIL = '[email protected]'
105+
SERVER_EMAIL = '[email protected]'
106+
```
85107

86108
!!! warning "Allow access to less secure apps"
87109

@@ -94,12 +116,50 @@ SERVER_EMAIL = '[email protected]'
94116

95117
SeaTable Cloud uses the SMTP relay of Brevo.
96118

97-
```python
98-
EMAIL_USE_TLS = True
99-
EMAIL_HOST = 'smtp-relay.sendinblue.com'
100-
EMAIL_HOST_USER = '[email protected]'
101-
EMAIL_HOST_PASSWORD = 'xsmtpsib-xxx'
102-
EMAIL_PORT = 587
103-
DEFAULT_FROM_EMAIL = 'SeaTable <[email protected]>'
104-
SERVER_EMAIL = '[email protected]'
105-
```
119+
=== "Environment variables"
120+
121+
```python
122+
SEATABLE_EMAIL_USE_TLS = True
123+
SEATABLE_EMAIL_HOST = 'smtp-relay.sendinblue.com'
124+
SEATABLE_EMAIL_HOST_USER = '[email protected]'
125+
SEATABLE_EMAIL_HOST_PASSWORD = 'xsmtpsib-xxx'
126+
SEATABLE_EMAIL_PORT = 587
127+
SEATABLE_DEFAULT_FROM_EMAIL = 'SeaTable <[email protected]>'
128+
SEATABLE_SERVER_EMAIL = '[email protected]'
129+
```
130+
131+
=== "Configuration file"
132+
133+
```python
134+
EMAIL_USE_TLS = True
135+
EMAIL_HOST = 'smtp-relay.sendinblue.com'
136+
EMAIL_HOST_USER = '[email protected]'
137+
EMAIL_HOST_PASSWORD = 'xsmtpsib-xxx'
138+
EMAIL_PORT = 587
139+
DEFAULT_FROM_EMAIL = 'SeaTable <[email protected]>'
140+
SERVER_EMAIL = '[email protected]'
141+
```
142+
143+
### Infomaniak
144+
145+
If you are using Infomaniak as email server, you can use the following settings.
146+
147+
=== "Environment variables"
148+
149+
!!! warning "SSL support missing"
150+
151+
Infomaniak requires SSL instead of TLS, therefore a configuration via environment variables is not yet possible.
152+
Please use the configuration file approach instead.
153+
154+
=== "Configuration file"
155+
156+
```python
157+
EMAIL_USE_TLS = False
158+
EMAIL_USE_SSL = True
159+
EMAIL_HOST = 'mail.infomaniak.com'
160+
EMAIL_HOST_USER = '[email protected]'
161+
EMAIL_HOST_PASSWORD = 'password'
162+
EMAIL_PORT = 465
163+
DEFAULT_FROM_EMAIL = 'SeaTable <[email protected]>'
164+
SERVER_EMAIL = '[email protected]'
165+
```

0 commit comments

Comments
 (0)