commit 412e1941ff67203966081305accb87ed79df2310
parent e0461bd2735a9e2fb6e1f8dfe13ff16a006d30d5
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Sun, 8 Dec 2019 11:02:46 +0100
generate message-id in prepare_email_forward
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/prepare_email_forward b/prepare_email_forward
@@ -6,7 +6,7 @@ import os.path as op
from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
from email.mime.text import MIMEText
-from email.utils import COMMASPACE, formatdate
+from email.utils import COMMASPACE, formatdate, make_msgid
from email import encoders
FROM = sys.argv[1]
@@ -22,6 +22,7 @@ msg['To'] = TO
msg['Date'] = formatdate(localtime=True)
msg['Subject'] = SUBJECT
msg['In-Reply-To'] = IN_REPLY_TO
+msg['Message-ID'] = make_msgid()
msg.attach(MIMEText(TEXT))