include date header in mail as some mail servers require that
This commit is contained in:
parent
1911694baf
commit
4bee60b8dd
1 changed files with 2 additions and 0 deletions
|
@ -196,6 +196,7 @@ class HedgedocExpire:
|
||||||
msg = MIMEMultipart()
|
msg = MIMEMultipart()
|
||||||
msg['From'] = self.email_sender.mail_from
|
msg['From'] = self.email_sender.mail_from
|
||||||
msg['To'] = self.email_from_email_or_profile(note)
|
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['Subject'] = f'Your HedgeDoc Note "{note["title"]}" has expired'
|
||||||
msg.attach(MIMEText(dedent(f'''\
|
msg.attach(MIMEText(dedent(f'''\
|
||||||
You created the note titled "{note["title"]}" on {note["createdAt"]}.
|
You created the note titled "{note["title"]}" on {note["createdAt"]}.
|
||||||
|
@ -301,6 +302,7 @@ class HedgedocExpire:
|
||||||
msg = MIMEMultipart()
|
msg = MIMEMultipart()
|
||||||
msg['From'] = self.email_sender.mail_from
|
msg['From'] = self.email_sender.mail_from
|
||||||
msg['To'] = self.email_sender.mail_from
|
msg['To'] = self.email_sender.mail_from
|
||||||
|
msg['Date'] = email.utils.formatdate()
|
||||||
msg['Subject'] = f'Hedgedoc Expire: Report'
|
msg['Subject'] = f'Hedgedoc Expire: Report'
|
||||||
msg.attach(MIMEText(dedent(f'''\
|
msg.attach(MIMEText(dedent(f'''\
|
||||||
This report shows which notes and revisions would be deleted if expire would be run now.
|
This report shows which notes and revisions would be deleted if expire would be run now.
|
||||||
|
|
Loading…
Reference in a new issue