From 2d1218cd6aba79cc883a9f2d2ece9e39eefdb98a Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Sun, 27 Jun 2021 09:17:00 +0200 Subject: [PATCH] Small modification adding date --- sysadmin/drymail.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysadmin/drymail.py b/sysadmin/drymail.py index 4ea4685..efae007 100644 --- a/sysadmin/drymail.py +++ b/sysadmin/drymail.py @@ -5,7 +5,7 @@ from email.header import Header from email.mime.base import MIMEBase from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText -from email.utils import formataddr +from email.utils import formataddr, formatdate from smtplib import SMTP, SMTP_SSL, SMTPServerDisconnected import mistune @@ -335,6 +335,7 @@ class Message: self.message['From'] = stringify_addresses(self.authors) if self.authors else stringify_address(self.sender) self.message['To'] = stringify_addresses(self.receivers) self.message['Subject'] = self.subject + self.message["Date"] = formatdate(localtime=True) if self.cc: self.message['CC'] = stringify_addresses(self.cc) if self.bcc: