diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2009-11-22 23:20:57 +1100 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2009-11-22 23:20:57 +1100 |
commit | 747d56881a07d4636fbaceb1542579d5e02daddd (patch) | |
tree | a50b5c656cd50e0d7b14281ffdb157ebb60f69d8 /actionmailer/lib/action_mailer | |
parent | f6f70540bbb77a80df0949d0c9e57239bca10132 (diff) | |
download | rails-747d56881a07d4636fbaceb1542579d5e02daddd.tar.gz rails-747d56881a07d4636fbaceb1542579d5e02daddd.tar.bz2 rails-747d56881a07d4636fbaceb1542579d5e02daddd.zip |
131 tests, 309 assertions, 0 failures, 0 errors
Diffstat (limited to 'actionmailer/lib/action_mailer')
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 7 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/quoting.rb | 2 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail_compat.rb | 22 |
3 files changed, 5 insertions, 26 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index d0924f714a..3d0ac49c34 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -384,8 +384,9 @@ module ActionMailer #:nodoc: # content-disposition set to "attachment". def attachment(params, &block) params = { :content_type => params } if String === params - params = { :disposition => "attachment", - :transfer_encoding => "base64" }.merge(params) + params = { :content_disposition => "attachment", + :content_transfer_encoding => "base64" }.merge(params) + params[:data] = params.delete(:body) if params[:body] part(params, &block) end @@ -623,7 +624,7 @@ module ActionMailer #:nodoc: m.body = normalize_new_lines(@parts.first.body) else @parts.each do |p| - m.parts << p + m.add_part(p) end if real_content_type =~ /multipart/ diff --git a/actionmailer/lib/action_mailer/quoting.rb b/actionmailer/lib/action_mailer/quoting.rb index 94fa042002..b30441f9de 100644 --- a/actionmailer/lib/action_mailer/quoting.rb +++ b/actionmailer/lib/action_mailer/quoting.rb @@ -43,7 +43,7 @@ module ActionMailer # "to", "from", "cc", "bcc" and "reply-to" headers. def quote_address_if_necessary(address, charset) if Array === address - address.map { |a| quote_address_if_necessary(a, charset) } + address.map { |a| quote_address_if_necessary(a, charset) }.join(", ") elsif address =~ /^(\S.*)\s+(<.*>)$/ address = $2 phrase = quote_if_necessary($1.gsub(/^['"](.*)['"]$/, '\1'), charset) diff --git a/actionmailer/lib/action_mailer/vendor/tmail_compat.rb b/actionmailer/lib/action_mailer/vendor/tmail_compat.rb deleted file mode 100644 index 0e240eb478..0000000000 --- a/actionmailer/lib/action_mailer/vendor/tmail_compat.rb +++ /dev/null @@ -1,22 +0,0 @@ -# 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.") - -class Mail::Message - - 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 |