Permalink
Browse files

Adding default 8bit encoding if the body has non usascii in it

  • Loading branch information...
1 parent 616ebb8 commit b354496bda901cb0af499d6f3dff17a96a834a67 @mikel mikel committed Dec 28, 2009
Showing with 3 additions and 1 deletion.
  1. +2 −0 actionmailer/lib/action_mailer/base.rb
  2. +1 −1 actionmailer/test/mail_service_test.rb
@@ -593,6 +593,8 @@ def create_mail #:nodoc:
end
end
+ m.content_transfer_encoding = '8bit' unless m.body.only_us_ascii?
+
@mail = m
end
@@ -107,7 +107,7 @@ def utf8_body(recipient)
cc "Foo áëô îü <extended@example.net>"
bcc "Foo áëô îü <extended@example.net>"
charset "utf-8"
-
+
render :text => "åœö blah"
end

0 comments on commit b354496

Please sign in to comment.