diff options
Diffstat (limited to 'actionmailer/lib/action_mailer')
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail/attachments.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/actionmailer/lib/action_mailer/vendor/tmail/attachments.rb b/actionmailer/lib/action_mailer/vendor/tmail/attachments.rb index 4d8d106ad8..7961b03ac5 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail/attachments.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail/attachments.rb @@ -18,7 +18,9 @@ module TMail def attachments if multipart? parts.collect { |part| - if attachment?(part) + if part.multipart? + part.attachments + elsif attachment?(part) content = part.body # unquoted automatically by TMail#body file_name = (part['content-location'] && part['content-location'].body) || @@ -32,7 +34,7 @@ module TMail attachment.content_type = part.content_type attachment end - }.compact + }.flatten.compact end end end |