diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2009-11-12 16:08:50 +1100 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2009-11-12 16:08:50 +1100 |
commit | 15d7cac282e29f0a8e7b38dade07abb32d97a991 (patch) | |
tree | 573d27da4f642b2b16840fbc7621d85acd8634ea /actionmailer/lib/action_mailer/vendor/tmail_compat.rb | |
parent | cbded53671bccccbaf7e9fdfa93ef86cb097daa3 (diff) | |
download | rails-15d7cac282e29f0a8e7b38dade07abb32d97a991.tar.gz rails-15d7cac282e29f0a8e7b38dade07abb32d97a991.tar.bz2 rails-15d7cac282e29f0a8e7b38dade07abb32d97a991.zip |
Starting again on actionmailer integration with mail
Diffstat (limited to 'actionmailer/lib/action_mailer/vendor/tmail_compat.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail_compat.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/actionmailer/lib/action_mailer/vendor/tmail_compat.rb b/actionmailer/lib/action_mailer/vendor/tmail_compat.rb new file mode 100644 index 0000000000..988a2d3378 --- /dev/null +++ b/actionmailer/lib/action_mailer/vendor/tmail_compat.rb @@ -0,0 +1,36 @@ +# TMail Compatibility File +# Created in 1.2 of Mail. Will be deprecated +STDERR.puts("DEPRECATION WARNING, Mail running in TMail compatibility mode. This will be deprecated soon.") + +module Mail + + def Mail.parse(string) + STDERR.puts("DEPRECATION WARNING, Mail.parse(string) is deprecated, please use Mail.new") + ::Mail.new(string) + end + +end + +class Mail::Message + + def set_content_type(*args) + STDERR.puts("DEPRECATION WARNING, Message#set_content_type is deprecated, please use Message#content_type") + content_type(args) + end + + def set_content_disposition(*args) + STDERR.puts("DEPRECATION WARNING, Message#set_content_disposition is deprecated, please use Message#content_disposition") + content_disposition(args) + end + + def encoding=(val) + STDERR.puts("DEPRECATION WARNING, Message#encoding= is deprecated, please use Message#content_transfer_encoding") + content_transfer_encoding(val) + end + + def quoted_body + STDERR.puts("DEPRECATION WARNING, Body#quoted_body is deprecated, please use Message => Body#encoded") + body.decoded + end + +end |