fix syntax for compatibility

This commit is contained in:
Charlie Smurthwaite
2019-07-17 14:46:33 +01:00
parent 34e5085c37
commit 634d3af59d
+2
View File
@@ -328,12 +328,14 @@ module Postal
mail = Mail.new(self.raw_headers) mail = Mail.new(self.raw_headers)
mail.header.fields.each_with_object({}) do |field, hash| mail.header.fields.each_with_object({}) do |field, hash|
hash[field.name.downcase] ||= [] hash[field.name.downcase] ||= []
begin
hash[field.name.downcase] << field.decoded hash[field.name.downcase] << field.decoded
rescue Mail::Field::IncompleteParseError rescue Mail::Field::IncompleteParseError
# Never mind, move on to the next header # Never mind, move on to the next header
end end
end end
end end
end
# #
# Return the recipient domain for this message # Return the recipient domain for this message