Merge pull request #5152 from achillesrasquinha/py3
[FIX] safe_encode Email
This commit is contained in:
commit
f312dfad32
1 changed files with 2 additions and 2 deletions
|
|
@ -9,7 +9,7 @@ import time, _socket, poplib, imaplib, email, email.utils, datetime, chardet, re
|
|||
from email_reply_parser import EmailReplyParser
|
||||
from email.header import decode_header
|
||||
import frappe
|
||||
from frappe import _, safe_decode
|
||||
from frappe import _, safe_decode, safe_encode
|
||||
from frappe.utils import (extract_email_id, convert_utc_to_user_timezone, now,
|
||||
cint, cstr, strip, markdown, parse_addr)
|
||||
from frappe.utils.scheduler import log
|
||||
|
|
@ -360,7 +360,7 @@ class Email:
|
|||
"""Parses headers, content, attachments from given raw message.
|
||||
|
||||
:param content: Raw message."""
|
||||
self.raw = safe_decode(content)
|
||||
self.raw = safe_encode(content)
|
||||
self.mail = email.message_from_string(self.raw)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue