Small modification adding date
This commit is contained in:
parent
a5e1dc75b9
commit
2d1218cd6a
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue