FIX: fix email replies for ms outlook
This commit is contained in:
parent
199896a607
commit
24a0db3244
|
@ -114,7 +114,8 @@ module Email
|
|||
html = fix_charset message.html_part
|
||||
text = fix_charset message.text_part
|
||||
# TODO picking text if available may be better
|
||||
if text && !html
|
||||
# in case of email reply from MS Outlook client, prefer text
|
||||
if (text && !html) || (text && message.header.to_s =~ /X-MS-Has-Attach/)
|
||||
return text
|
||||
end
|
||||
elsif message.content_type =~ /text\/html/
|
||||
|
|
|
@ -93,6 +93,10 @@ Pleasure to have you here!
|
|||
)
|
||||
end
|
||||
|
||||
it "properly renders email reply from MS Outlook client" do
|
||||
test_parse_body(fixture_file("emails/outlook.eml")).should == "Microsoft Outlook 2010"
|
||||
end
|
||||
|
||||
it "converts back to UTF-8 at the end" do
|
||||
result = test_parse_body(fixture_file("emails/big5.eml"))
|
||||
result.encoding.should == Encoding::UTF_8
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue