aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/CHANGELOG14
-rw-r--r--actionmailer/lib/action_mailer.rb5
-rw-r--r--actionmailer/lib/action_mailer/base.rb6
-rw-r--r--actionmailer/lib/action_mailer/utils.rb7
4 files changed, 12 insertions, 20 deletions
diff --git a/actionmailer/CHANGELOG b/actionmailer/CHANGELOG
index 0d16540661..9b07686b64 100644
--- a/actionmailer/CHANGELOG
+++ b/actionmailer/CHANGELOG
@@ -1,13 +1,16 @@
*Mail Integration
-* Mail does not have "quoted_body", "quoted_subject" etc. All of these are accessed via body.encoded, subject.encoded etc
+* Mail does not have "quoted_body", "quoted_subject" etc. All of these are accessed via body.encoded,
+ subject.encoded etc
-* Every part of a Mail object returns an object, never a string. So Mail.body returns a Mail::Body class object, need to call #encoded or #decoded to get the string you want
+* Every part of a Mail object returns an object, never a string. So Mail.body returns a Mail::Body
+ class object, need to call #encoded or #decoded to get the string you want
* Mail::Message#set_content_type does not exist, it is simply Mail::Message#content_type
-* Every mail message gets a unique message_id unless you specify one, had to change all the tests that check for
- equality with expected.encoded == actual.encoded to first replace their message_ids with control values
+* Every mail message gets a unique message_id unless you specify one, had to change all the tests that
+ check for equality with expected.encoded == actual.encoded to first replace their message_ids with
+ control values
* Mail now has a proper concept of parts, remove the ActionMailer::Part and ActionMailer::PartContainer classes
@@ -20,9 +23,6 @@
* There is no idea of a "sub_head" in Mail. A part is just a Message with some extra functionality, so it
just has a "header" like a normal mail message
-
-* When you want to add a nested part, you now need to use "add_part(params)" instead of "part(params)" This
- creates a Mail gem Part object
*2.3.2 [Final] (March 15, 2009)*
diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb
index 3eb385d3b0..15555af19e 100644
--- a/actionmailer/lib/action_mailer.rb
+++ b/actionmailer/lib/action_mailer.rb
@@ -40,7 +40,6 @@ module ActionMailer
autoload :Quoting, 'action_mailer/quoting'
autoload :TestCase, 'action_mailer/test_case'
autoload :TestHelper, 'action_mailer/test_helper'
- autoload :Utils, 'action_mailer/utils'
end
@@ -54,5 +53,5 @@ end
autoload :MailHelper, 'action_mailer/mail_helper'
-gem 'mail', '>= 1.2.8'
-require 'mail' \ No newline at end of file
+gem 'mail', '>= 1.2.9'
+require 'mail'
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