From 0cc65231159991b9423b7df5a2f105ef3e8d8a7d Mon Sep 17 00:00:00 2001 From: davalanche Date: Tue, 8 Oct 2019 22:47:18 -0600 Subject: [PATCH] IMP:(#2352) Added Date and Message-ID Headers to Email Notifications --- mylar/notifiers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mylar/notifiers.py b/mylar/notifiers.py index 3393460c..663c2a5b 100644 --- a/mylar/notifiers.py +++ b/mylar/notifiers.py @@ -30,6 +30,7 @@ import requests import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText +from email.utils import formatdate, make_msgid # This was obviously all taken from headphones with great appreciation :) @@ -383,6 +384,8 @@ class EMAIL: msg['From'] = str(self.emailfrom) msg['To'] = str(self.emailto) msg['Subject'] = subject + msg['Date'] = formatdate() + msg['Message-ID'] = make_msgid('mylar') msg.attach(MIMEText(message, 'plain')) if self.emailenc is 1: