diff options
| author | Julien Castiaux <juc@odoo.com> | 2020-12-10 16:10:47 +0000 |
|---|---|---|
| committer | Julien Castiaux <juc@odoo.com> | 2020-12-11 12:42:17 +0000 |
| commit | e628defec14f3b36612951bc698fa51b7c9f56bb (patch) | |
| tree | 55cca57950c1e26821e188ffad9e1aa26cfc8fe4 | |
| parent | 366bf51bb07aac6edca668635f49316b21bbb7be (diff) | |
[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#63191
Task: 2329606
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
| -rw-r--r-- | addons/mail/models/mail_thread.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py index d694f4f913e..1165caecbed 100644 --- a/addons/mail/models/mail_thread.py +++ b/addons/mail/models/mail_thread.py @@ -1722,6 +1722,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= { |
