aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/lib/action_mailer/vendor/tmail/quoting.rb')
-rw-r--r--actionmailer/lib/action_mailer/vendor/tmail/quoting.rb13
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)