Holger Brunn
6 years ago
No known key found for this signature in database
GPG Key ID: 1C9760FECA3AE18
1 changed files with
2 additions and
3 deletions
-
mail_drop_target/models/mail_thread.py
|
|
@ -1,7 +1,6 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2018 Therp BV <https://therp.nl> |
|
|
|
# Copyright 2018 Therp BV <https://therp.nl> |
|
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
|
|
|
from StringIO import StringIO |
|
|
|
from base64 import b64decode |
|
|
|
try: |
|
|
|
from ExtractMsg import Message |
|
|
@ -23,7 +22,7 @@ class MailThread(models.AbstractModel): |
|
|
|
raise exceptions.UserError( |
|
|
|
_('Install the msg-extractor library to handle .msg files') |
|
|
|
) |
|
|
|
message_msg = Message(StringIO(b64decode(message))) |
|
|
|
message_msg = Message(b64decode(message)) |
|
|
|
message_email = self.env['ir.mail_server'].build_email( |
|
|
|
message_msg.sender, message_msg.to.split(','), message_msg.subject, |
|
|
|
# prefer html bodies to text |
|
|
|