This commit is contained in:
parent
7a367cd8de
commit
d72f7d7b10
1 changed files with 2 additions and 2 deletions
|
@ -232,7 +232,7 @@ class HedgedocExpire:
|
|||
''')))
|
||||
md = MIMEBase('text', 'markdown')
|
||||
md.add_header('Content-Disposition', f'attachment; filename={note["title"]}.md')
|
||||
md.set_payload(note["content"])
|
||||
md.set_payload(note["content"].encode(encoding='utf-8'))
|
||||
msg.attach(md)
|
||||
self.email_sender.send(msg)
|
||||
|
||||
|
@ -243,7 +243,7 @@ class HedgedocExpire:
|
|||
url = self.config.url + '/' + (note["alias"] if note["alias"] is not None else note["shortid"])
|
||||
print(f'Note "{note["title"]}" ({url}) emailed to {msg["To"]}')
|
||||
except Exception as e:
|
||||
print(f'Unable to send email to {note["email"]}: {e}', file=sys.stderr)
|
||||
print(f'Unable to send email to {self.email_from_email_or_profile(note)}: {e}', file=sys.stderr)
|
||||
|
||||
def expire_old_revisions(self, db) -> None:
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue