diff options
author | Jamis Buck <jamis@37signals.com> | 2005-06-06 16:06:26 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-06-06 16:06:26 +0000 |
commit | cf1e2a84fff32ab1cf2a736bb99c53e830d92db3 (patch) | |
tree | 0fb88beb26786057a35232067e479f4b2b0e80d6 /actionmailer/lib | |
parent | 5add31eda48aa2db61ee0c76d3d8bc5a0992e6f5 (diff) | |
download | rails-cf1e2a84fff32ab1cf2a736bb99c53e830d92db3.tar.gz rails-cf1e2a84fff32ab1cf2a736bb99c53e830d92db3.tar.bz2 rails-cf1e2a84fff32ab1cf2a736bb99c53e830d92db3.zip |
Handle parsing of recursively multipart messages
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1389 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/lib')
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail/quoting.rb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb b/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb index 43e834b2a6..4420f2ea6b 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb @@ -28,9 +28,16 @@ module TMail if multipart? parts.collect { |part| header = part["content-type"] - header && header.main_type == "text" ? - part.unquoted_body(to_charset) : - (header ? attachment_presenter.call(header.params["name"]) : "") + + if part.multipart? + part.body(to_charset, &attachment_presenter) + elsif header.nil? + "" + elsif header.main_type == "text" + part.unquoted_body(to_charset) + else + attachment_presenter.call(header["name"] || "(unnamed)") + end }.join else unquoted_body(to_charset) |