1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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