From 4bee60b8dddbf6af5408eeb7596bcaadc7a9e94c Mon Sep 17 00:00:00 2001 From: Julian Schacher Date: Mon, 9 Dec 2024 17:39:14 +0100 Subject: [PATCH] include date header in mail as some mail servers require that --- hedgedoc-expire.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hedgedoc-expire.py b/hedgedoc-expire.py index 30567a3..64ed766 100644 --- a/hedgedoc-expire.py +++ b/hedgedoc-expire.py @@ -196,6 +196,7 @@ class HedgedocExpire: msg = MIMEMultipart() msg['From'] = self.email_sender.mail_from msg['To'] = self.email_from_email_or_profile(note) + msg['Date'] = email.utils.formatdate() msg['Subject'] = f'Your HedgeDoc Note "{note["title"]}" has expired' msg.attach(MIMEText(dedent(f'''\ You created the note titled "{note["title"]}" on {note["createdAt"]}. @@ -301,6 +302,7 @@ class HedgedocExpire: msg = MIMEMultipart() msg['From'] = self.email_sender.mail_from msg['To'] = self.email_sender.mail_from + msg['Date'] = email.utils.formatdate() msg['Subject'] = f'Hedgedoc Expire: Report' msg.attach(MIMEText(dedent(f'''\ This report shows which notes and revisions would be deleted if expire would be run now.