This commit is contained in:
parent
e0439dc667
commit
cecad168d0
|
@ -229,10 +229,12 @@ class HedgedocExpire:
|
|||
|
||||
The admin team for {self.config.url}
|
||||
|
||||
''')))
|
||||
md = MIMEBase('text', 'markdown')
|
||||
md.add_header('Content-Disposition', f'attachment; filename={note["title"]}.md')
|
||||
md.set_payload(note["content"].encode(encoding='utf-8'))
|
||||
'''), 'plain', 'utf-8'))
|
||||
md = MIMEText(note["content"], 'markdown', 'utf-8')
|
||||
filename = note['title'].encode('ascii', 'ignore').decode('utf-8')
|
||||
if len(filename) == 0:
|
||||
filename = 'note'
|
||||
md.add_header('Content-Disposition', f'attachment; filename={filename}.md')
|
||||
msg.attach(md)
|
||||
self.email_sender.send(msg)
|
||||
|
||||
|
|
Loading…
Reference in a new issue