diff options
Diffstat (limited to 'actionmailer/lib/action_mailer/vendor')
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail/attachments.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/vendor/tmail/attachments.rb b/actionmailer/lib/action_mailer/vendor/tmail/attachments.rb index e402b0545f..cdc4ba8631 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail/attachments.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail/attachments.rb @@ -15,7 +15,9 @@ module TMail parts.collect { |part| if part.header["content-type"].main_type != "text" content = part.body # unquoted automatically by TMail#body - file_name = part.sub_header("content-type", "name") || + file_name = (part['content-location'] && + part['content-location'].body) || + part.sub_header("content-type", "name") || part.sub_header("content-disposition", "filename") next if file_name.blank? || content.blank? |