[FIX] crm: Corrected handling text/html type emails. Converts html tags to plain text.
lp bug: https://launchpad.net/bugs/644325 fixed bzr revid: uco@tinyerp.com-20101111101426-6t71jz3pk8jtyk6a
This commit is contained in:
parent
eb8bd6581d
commit
f58df4820f
|
@ -486,6 +486,8 @@ class mailgate_tool(osv.osv_memory):
|
|||
if not msg_txt.is_multipart() or 'text/plain' in msg.get('Content-Type', ''):
|
||||
encoding = msg_txt.get_content_charset()
|
||||
body = msg_txt.get_payload(decode=True)
|
||||
if 'text/html' in msg_txt.get('Content-Type', ''):
|
||||
body = tools.html2plaintext(body)
|
||||
msg['body'] = tools.ustr(body, encoding)
|
||||
|
||||
attachments = {}
|
||||
|
|
Loading…
Reference in New Issue