Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion motioneye/handlers/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import json
import logging
import os
import re
import socket

from tornado.ioloop import IOLoop
Expand Down Expand Up @@ -676,6 +677,9 @@ async def test(self, camera_id):
message = message % format_dict
subject = subject % format_dict

to = [t.strip() for t in re.split('[,;| ]', data['addresses'])]
to = [t for t in to if t]

old_timeout = settings.SMTP_TIMEOUT
settings.SMTP_TIMEOUT = 10
sendmail.send_mail(
Expand All @@ -685,7 +689,7 @@ async def test(self, camera_id):
data['smtp_password'],
data['smtp_tls'],
data['from'],
data['addresses'].split(','),
to,
subject=subject,
message=message,
files=[],
Expand Down
Loading