FEATURE: switch to GitHub email_reply_parser library and parse plain text email content

This commit is contained in:
Arpit Jalan
2014-11-25 22:14:59 +05:30
parent 003d32babe
commit 529014d56e
11 changed files with 1045 additions and 10 deletions

View File

@ -117,9 +117,9 @@ module Email
if message.multipart?
html = fix_charset message.html_part
text = fix_charset message.text_part
# TODO picking text if available may be better
# in case of email reply from MS Outlook client, prefer text
if (text && !html) || (text && (message.header.to_s =~ /X-MS-Has-Attach/ || message.header.to_s =~ /Microsoft Outlook/))
# prefer plain text
if text
return text
end
elsif message.content_type =~ /text\/html/