diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2009-12-28 21:41:16 +1100 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2009-12-28 21:41:16 +1100 |
commit | b354496bda901cb0af499d6f3dff17a96a834a67 (patch) | |
tree | 403c85727badbe72d5d6bd1971b6b1bc6303f6f5 | |
parent | 616ebb8f6a5dc38a6fe0ee497f2059a9bd78a457 (diff) | |
download | rails-b354496bda901cb0af499d6f3dff17a96a834a67.tar.gz rails-b354496bda901cb0af499d6f3dff17a96a834a67.tar.bz2 rails-b354496bda901cb0af499d6f3dff17a96a834a67.zip |
Adding default 8bit encoding if the body has non usascii in it
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 2 | ||||
-rw-r--r-- | actionmailer/test/mail_service_test.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index cd9bbd2d7b..aea2498d4d 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -593,6 +593,8 @@ module ActionMailer #:nodoc: end end + m.content_transfer_encoding = '8bit' unless m.body.only_us_ascii? + @mail = m end diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index bebd8df8e9..152900259d 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -107,7 +107,7 @@ class TestMailer < ActionMailer::Base cc "Foo áëô îü <extended@example.net>" bcc "Foo áëô îü <extended@example.net>" charset "utf-8" - + render :text => "åœö blah" end |