File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -119,10 +119,10 @@ def read_secret(secret_name):
119
119
'PASSWORD' : os .environ .get ('EMAIL_PASSWORD' , read_secret ('email_password' )),
120
120
'TIMEOUT' : int (os .environ .get ('EMAIL_TIMEOUT' , 10 )), # seconds
121
121
'FROM_EMAIL' : os .environ .get ('EMAIL_FROM' , '' ),
122
- 'USE_SSL' : os .environ .get ('EMAIL_USE_SSL' , 'False' ),
123
- 'USE_TLS' : os .environ .get ('EMAIL_USE_TLS' , 'False' ),
124
- 'SSL_CERTFILE' : os .environ .get ('EMAIL_SSL_CERTFILE' , '' )
125
- 'SSL_KEYFILE' : os .environ .get ('EMAIL_SSL_KEYFILE' , '' )
122
+ 'USE_SSL' : os .environ .get ('EMAIL_USE_SSL' , 'False' ). lower () == 'true' ,
123
+ 'USE_TLS' : os .environ .get ('EMAIL_USE_TLS' , 'False' ). lower () == 'true' ,
124
+ 'SSL_CERTFILE' : os .environ .get ('EMAIL_SSL_CERTFILE' , '' ),
125
+ 'SSL_KEYFILE' : os .environ .get ('EMAIL_SSL_KEYFILE' , '' ),
126
126
}
127
127
128
128
# Enforcement of unique IP space can be toggled on a per-VRF basis.
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ EMAIL_USERNAME=netbox
9
9
EMAIL_PASSWORD =
10
10
EMAIL_TIMEOUT = 5
11
11
EMAIL_FROM = netbox@bar.com
12
+ # EMAIL_USE_SSL and EMAIL_USE_TLS are mutually exclusive, i.e. they can't both be `true`!
12
13
EMAIL_USE_SSL = false
13
14
EMAIL_USE_TLS = false
14
15
EMAIL_SSL_CERTFILE =
You can’t perform that action at this time.
0 commit comments