diff options
Diffstat (limited to 'actionmailer/lib/action_mailer/vendor/tmail/quoting.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail/quoting.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb b/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb index 626e88238f..1ff00d9299 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb @@ -9,7 +9,8 @@ begin end def unquoted_body(to_charset = 'utf-8') - Unquoter.unquote_and_convert_to(quoted_body, to_charset, header["content-type"]["charset"]) + from_charset = header['content-type']['charset'] rescue 'us-ascii' + Unquoter.unquote_and_convert_to(quoted_body, to_charset, from_charset) end def body(to_charset = 'utf-8', &block) @@ -97,4 +98,4 @@ rescue LoadError => e end end end -end
\ No newline at end of file +end |