aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-03-21 12:10:47 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-03-21 12:10:47 +0000
commitcb69736a1084d5412ede7628f864eccc356bb88c (patch)
tree342c26d2674b76be5d7fc23ad205accce20ea52c /actionmailer/lib
parent553f115be537e279cf5432d650225184d87c4eff (diff)
downloadrails-cb69736a1084d5412ede7628f864eccc356bb88c.tar.gz
rails-cb69736a1084d5412ede7628f864eccc356bb88c.tar.bz2
rails-cb69736a1084d5412ede7628f864eccc356bb88c.zip
Made the unquoted subject and body the default
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@964 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/lib')
-rwxr-xr-xactionmailer/lib/action_mailer/vendor/tmail/facade.rb1
-rwxr-xr-xactionmailer/lib/action_mailer/vendor/tmail/mail.rb2
-rw-r--r--actionmailer/lib/action_mailer/vendor/tmail/quoting.rb13
3 files changed, 9 insertions, 7 deletions
diff --git a/actionmailer/lib/action_mailer/vendor/tmail/facade.rb b/actionmailer/lib/action_mailer/vendor/tmail/facade.rb
index 4b8e2fbc07..0a12a61a75 100755
--- a/actionmailer/lib/action_mailer/vendor/tmail/facade.rb
+++ b/actionmailer/lib/action_mailer/vendor/tmail/facade.rb
@@ -261,6 +261,7 @@ module TMail
default
end
end
+ alias quoted_subject subject
def subject=( str )
set_string_attr 'Subject', str
diff --git a/actionmailer/lib/action_mailer/vendor/tmail/mail.rb b/actionmailer/lib/action_mailer/vendor/tmail/mail.rb
index 85a80fd29c..5aa111ad1f 100755
--- a/actionmailer/lib/action_mailer/vendor/tmail/mail.rb
+++ b/actionmailer/lib/action_mailer/vendor/tmail/mail.rb
@@ -322,7 +322,7 @@ module TMail
body_port().ropen {|f| f.each(&block) }
end
- def body
+ def quoted_body
parse_body
@body_port.ropen {|f|
return f.read
diff --git a/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb b/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb
index d460ece5a1..d5087f7610 100644
--- a/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb
+++ b/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb
@@ -3,24 +3,25 @@ require 'base64'
module TMail
class Mail
- def unquoted_subject(to_charset = 'utf-8')
- Unquoter.unquote_and_convert_to(subject || "", to_charset)
+ def subject(to_charset = 'utf-8')
+ Unquoter.unquote_and_convert_to(quoted_subject || "", to_charset)
end
def unquoted_body(to_charset = 'utf-8')
- Unquoter.unquote_and_convert_to(body || "", to_charset, header["content-type"]["charset"])
+ Unquoter.unquote_and_convert_to(quoted_body || "", to_charset, header["content-type"]["charset"])
end
- def unquoted_body_with_all_parts(to_charset = 'utf-9', &block)
+ def body(to_charset = 'utf-8', &block)
attachment_presenter = block || Proc.new { |file_name| "Attachment: #{file_name}\n" }
if multipart?
parts.collect { |part|
part.header["content-type"].main_type == "text" ?
- part.unquoted_body : attachment_presenter.call(part.header["content-type"].params["name"])
+ part.unquoted_body(to_charset) :
+ attachment_presenter.call(part.header["content-type"].params["name"])
}.join
else
- unquoted_body
+ unquoted_body(to_charset)
end
end
end