1
0
Fork 0

Small modification adding date

This commit is contained in:
Luca Beltrame 2021-06-27 09:17:00 +02:00
parent a5e1dc75b9
commit 2d1218cd6a
Signed by: einar
GPG key ID: 4707F46E9EC72DEC

View file

@ -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: