diff options
Diffstat (limited to 'actionmailer/lib')
-rw-r--r-- | actionmailer/lib/action_mailer.rb | 2 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 3 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/test_case.rb | 2 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/tmail_compat.rb | 11 |
4 files changed, 14 insertions, 4 deletions
diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index 039715c2f5..55ddbb24f4 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -45,5 +45,3 @@ module Text autoload :Format, 'action_mailer/vendor/text_format' end - -require 'action_mailer/tmail_compat'
\ No newline at end of file diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index aea2498d4d..f34a9bae47 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -1,5 +1,6 @@ require 'active_support/core_ext/class' require 'mail' +require 'action_mailer/tmail_compat' module ActionMailer #:nodoc: # Action Mailer allows you to send email from your application using a mailer model and views. @@ -149,7 +150,7 @@ module ActionMailer #:nodoc: # # part "text/plain" do |p| # p.body = render_message("signup-as-plain", :account => recipient) - # p.transfer_encoding = "base64" + # p.content_transfer_encoding = "base64" # end # end # end diff --git a/actionmailer/lib/action_mailer/test_case.rb b/actionmailer/lib/action_mailer/test_case.rb index 445abd0b89..e8632d4559 100644 --- a/actionmailer/lib/action_mailer/test_case.rb +++ b/actionmailer/lib/action_mailer/test_case.rb @@ -1,5 +1,5 @@ require 'active_support/test_case' -require 'mail' +require 'action_mailer/base' module ActionMailer class NonInferrableMailerError < ::StandardError diff --git a/actionmailer/lib/action_mailer/tmail_compat.rb b/actionmailer/lib/action_mailer/tmail_compat.rb index cacd79be27..0d6fc13347 100644 --- a/actionmailer/lib/action_mailer/tmail_compat.rb +++ b/actionmailer/lib/action_mailer/tmail_compat.rb @@ -6,5 +6,16 @@ module Mail content_type(*args) end + + alias :old_transfer_encoding :transfer_encoding + def transfer_encoding(value = nil) + if value + STDERR.puts("Message#transfer_encoding is deprecated, please call Message#content_transfer_encoding with the same arguments.\n#{caller}") + content_transfer_encoding(value) + else + old_transfer_encoding + end + end + end end
\ No newline at end of file |