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

This commit is contained in:
Mikel Lindsaar
2009-12-28 21:41:16 +11:00
parent 616ebb8f6a
commit b354496bda
2 changed files with 3 additions and 1 deletions

View File

@@ -593,6 +593,8 @@ module ActionMailer #:nodoc:
end
end
m.content_transfer_encoding = '8bit' unless m.body.only_us_ascii?
@mail = m
end

View File

@@ -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