aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/lib/action_mailer')
-rw-r--r--actionmailer/lib/action_mailer/base.rb6
-rw-r--r--actionmailer/lib/action_mailer/utils.rb7
2 files changed, 3 insertions, 10 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 3d0ac49c34..bf5e15e0e5 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -251,7 +251,7 @@ module ActionMailer #:nodoc:
# and appear last in the mime encoded message. You can also pick a different order from inside a method with
# +implicit_parts_order+.
class Base
- include AdvAttrAccessor, Quoting, Utils
+ include AdvAttrAccessor, Quoting
include AbstractController::RenderingController
include AbstractController::LocalizedCache
@@ -617,11 +617,11 @@ module ActionMailer #:nodoc:
if @parts.empty?
main_type, sub_type = split_content_type(real_content_type)
m.content_type([main_type, sub_type, ctype_attrs])
- m.body = normalize_new_lines(body)
+ m.body = body
elsif @parts.size == 1 && @parts.first.parts.empty?
main_type, sub_type = split_content_type(real_content_type)
m.content_type([main_type, sub_type, ctype_attrs])
- m.body = normalize_new_lines(@parts.first.body)
+ m.body = @parts.first.body.encoded
else
@parts.each do |p|
m.add_part(p)
diff --git a/actionmailer/lib/action_mailer/utils.rb b/actionmailer/lib/action_mailer/utils.rb
deleted file mode 100644
index 26d2e60aaf..0000000000
--- a/actionmailer/lib/action_mailer/utils.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-module ActionMailer
- module Utils #:nodoc:
- def normalize_new_lines(text)
- text.to_s.gsub(/\r\n?/, "\n")
- end
- end
-end