diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-04-25 09:40:03 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-04-25 09:40:03 +0100 |
commit | d5c962d2a51104133deac97d959215e9eed564e3 (patch) | |
tree | d425c46ef886566f2aa63704b2120b3fa95273d2 /lib/mail_handler/backends/mail_extensions.rb | |
parent | 486a2d0b3b03febcc8aea001f799bb5d01639046 (diff) | |
parent | 268de9d8dd5eb03a314a1358947b07565710be1f (diff) |
Merge branch 'hotfix/0.17.0.1' into rails-3-develop
Diffstat (limited to 'lib/mail_handler/backends/mail_extensions.rb')
-rw-r--r-- | lib/mail_handler/backends/mail_extensions.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/mail_handler/backends/mail_extensions.rb b/lib/mail_handler/backends/mail_extensions.rb index 87af526bf..f778cbc14 100644 --- a/lib/mail_handler/backends/mail_extensions.rb +++ b/lib/mail_handler/backends/mail_extensions.rb @@ -1,4 +1,5 @@ require 'mail/message' +require 'mail/part' require 'mail/fields/common/parameter_hash' module Mail class Message @@ -9,6 +10,12 @@ module Mail attr_accessor :count_first_uudecode_count end + class Part < Message + def inline? + header[:content_disposition].disposition_type == 'inline' if header[:content_disposition] rescue false + end + end + # A patched version of the parameter hash that handles nil values without throwing # an error. class ParameterHash < IndifferentHash @@ -95,4 +102,5 @@ module Mail end end + end |