diff options
Diffstat (limited to 'lib/mail_handler/backends')
-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 |