[FIX] mail: Receive EML file in attachment

Configure the incomming mail server, use another mail client to send a
message to Odoo with an EML file as attachment. The fetchmail server
fails.

Since the introduction of the new EmailMessage python API to
encode/decode email messages, every EML attachment is automatically
parsed into a EmailMessage.

closes odoo/odoo#63255

Task: 2329606
X-original-commit: e628defec14f3b36612951bc698fa51b7c9f56bb
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
This commit is contained in:
Julien Castiaux
2020-12-11 14:59:27 +00:00
parent 153742b447
commit 1a20f11005
+2
View File
@@ -1702,6 +1702,8 @@ class MailThread(models.AbstractModel):
continue
if isinstance(content, str):
content = content.encode('utf-8')
elif isinstance(content, EmailMessage):
content = content.as_bytes()
elif content is None:
continue
attachement_values= {