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: