Skip to content

Commit 27fa1a7

Browse files
committed
Merge remote-tracking branch 'origin/dev' into dev
2 parents 33690c7 + 91e79cc commit 27fa1a7

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

motioneye/config.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,6 +1366,16 @@ def motion_camera_ui_to_dict(ui, prev_config=None):
13661366
),
13671367
)
13681368

1369+
if ui['email_notifications_from'] != '':
1370+
email_from = input_sanity_check(
1371+
emailValidRegExp,
1372+
ui['email_notifications_from'],
1373+
'email_notifications_from',
1374+
emailFailMessage,
1375+
)
1376+
else:
1377+
email_from = ''
1378+
13691379
line = (
13701380
"%(script)s '%(server)s' '%(port)s' '%(account)s' '%(password)s' '%(tls)s' '%(from)s' '%(to)s' "
13711381
"'motion_start' '%%t' '%%Y-%%m-%%dT%%H:%%M:%%S' '%(timespan)s'"
@@ -1378,12 +1388,7 @@ def motion_camera_ui_to_dict(ui, prev_config=None):
13781388
.replace(';', '\\;')
13791389
.replace('%', '%%'),
13801390
'tls': ui['email_notifications_smtp_tls'],
1381-
'from': input_sanity_check(
1382-
emailValidRegExp,
1383-
ui['email_notifications_from'],
1384-
'email_notifications_from',
1385-
emailFailMessage,
1386-
),
1391+
'from': email_from,
13871392
'to': emails,
13881393
'timespan': ui['email_notifications_picture_time_span'],
13891394
}

0 commit comments

Comments
 (0)