Store mail file as bytes, not string.

This commit is contained in:
Albert Cervera i Areny 2023-03-20 00:36:10 +01:00
parent ef9c7f5403
commit 899037bbeb
1 changed files with 1 additions and 1 deletions

View File

@ -513,7 +513,7 @@ class ElectronicMail(ModelSQL, ModelView):
# 'content-transfer-encoding' is missing
# FIXED at py3.8 https://bugs.python.org/issue27321
try:
mail_file = mail.as_string()
mail_file = mail.as_bytes()
except KeyError:
return