diff --git a/actionmailer/CHANGELOG b/actionmailer/CHANGELOG index d43d2e326ea..14ceb687e78 100644 --- a/actionmailer/CHANGELOG +++ b/actionmailer/CHANGELOG @@ -1,5 +1,11 @@ *SVN* +* Fixed that if charset was found that the end of a mime part declaration TMail would throw an error #919 [lon@speedymac.com] + +* Fixed that TMail::Unquoter would fail to recognize quoting method if it was in lowercase #919 [lon@speedymac.com] + +* Fixed that TMail::Encoder would fail when it attempts to parse e-mail addresses which are encoded using something other than the messages encoding method #919 [lon@speedymac.com] + * Added rescue for missing iconv library and throws warnings if subject/body is called on a TMail object without it instead diff --git a/actionmailer/lib/action_mailer/vendor/tmail/encode.rb b/actionmailer/lib/action_mailer/vendor/tmail/encode.rb index 8f33386f4d9..c0909f30d2f 100755 --- a/actionmailer/lib/action_mailer/vendor/tmail/encode.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail/encode.rb @@ -295,7 +295,7 @@ module TMail else raise 'TMail FATAL: encoder scan fail' end - str = m.post_match + (str = m.post_match) unless m.nil? end do_encode types, strs diff --git a/actionmailer/lib/action_mailer/vendor/tmail/mail.rb b/actionmailer/lib/action_mailer/vendor/tmail/mail.rb index 5aa111ad1f6..22bc8edccaf 100755 --- a/actionmailer/lib/action_mailer/vendor/tmail/mail.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail/mail.rb @@ -281,6 +281,8 @@ module TMail when /\AFrom (\S+)/ unixfrom = $1 + when /^charset=.*/ + else raise SyntaxError, "wrong mail header: '#{line.inspect}'" end diff --git a/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb b/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb index f4f2463e341..626e88238f2 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb @@ -35,7 +35,7 @@ begin from_charset = $1 quoting_method = $2 text = $3 - case quoting_method + case quoting_method.upcase when "Q" then unquote_quoted_printable_and_convert_to(text, from_charset, to_charset) when "B" then