Fix mailer date header
This commit is contained in:
parent
e91eb187e3
commit
bfe15ca776
@ -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(
|
||||||
|
@ -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
|
||||||
|
Reference in New Issue
Block a user