Skip to content

Commit

Permalink
Add Message-ID to emails. (#3030)
Browse files Browse the repository at this point in the history
  • Loading branch information
donlorenzo authored Jul 21, 2024
1 parent 9f17117 commit 948b748
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion motioneye/sendmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.utils import formatdate
from email.utils import formatdate, make_msgid

from tornado.ioloop import IOLoop

Expand All @@ -53,6 +53,7 @@ def send_mail(server, port, account, password, tls, _from, to, subject, message,
email['From'] = _from
email['To'] = ', '.join(to)
email['Date'] = formatdate(localtime=True)
email['Message-ID'] = make_msgid()
email.attach(MIMEText(message))

for name in reversed(files):
Expand Down

0 comments on commit 948b748

Please sign in to comment.