From 948b74888194c6f77298cf323c22f05ee55d372c Mon Sep 17 00:00:00 2001 From: Lorenz Quack Date: Sun, 21 Jul 2024 19:30:24 +0200 Subject: [PATCH] Add Message-ID to emails. (#3030) --- motioneye/sendmail.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/motioneye/sendmail.py b/motioneye/sendmail.py index 8f4dc550d..9af77de71 100644 --- a/motioneye/sendmail.py +++ b/motioneye/sendmail.py @@ -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 @@ -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):