Fix mailer date header

This commit is contained in:
Fred Boniface 2023-06-07 10:32:15 +01:00
parent e91eb187e3
commit bfe15ca776
2 changed files with 3 additions and 3 deletions

View File

@ -54,12 +54,12 @@ def sendMail(msg_body :str, retry):
message['From'] = smtpFrom message['From'] = smtpFrom
message['To'] = "server-notification-receipt@fjla.uk" message['To'] = "server-notification-receipt@fjla.uk"
message['Subject'] = "OwlBoard - dbmanager Logs" message['Subject'] = "OwlBoard - dbmanager Logs"
message['Data'] = formatdate(localtime = True) message['Date'] = formatdate(localtime = True)
filename = "cif_data" filename = "cif_data"
message.attach(MIMEText(msg_body, "plain")) message.attach(MIMEText(msg_body, "plain"))
if os.path.exists(filename): if os.path.exists(filename):
with open(filename, "rb") as attachment: with open(filename, "rb") as attachment:
part = MIMEBase("application", "octet-stream") part = MIMEBase("text", "plain")
part.set_payload(attachment.read()) part.set_payload(attachment.read())
encoders.encode_base64(part) encoders.encode_base64(part)
part.add_header( part.add_header(

View File

@ -14,7 +14,7 @@
# program. If not, see # program. If not, see
# https://git.fjla.uk/OwlBoard/db-manager/src/branch/main/LICENSE # https://git.fjla.uk/OwlBoard/db-manager/src/branch/main/LICENSE
version = "2023.6.8" version = "2023.6.9"
print(f"main.py: Initialising db-manager v{version}") print(f"main.py: Initialising db-manager v{version}")
#Third Party Imports #Third Party Imports