diff --git a/lib/postal/message_db/message.rb b/lib/postal/message_db/message.rb index d3783d8..674e05a 100644 --- a/lib/postal/message_db/message.rb +++ b/lib/postal/message_db/message.rb @@ -328,9 +328,11 @@ module Postal mail = Mail.new(self.raw_headers) mail.header.fields.each_with_object({}) do |field, hash| hash[field.name.downcase] ||= [] - hash[field.name.downcase] << field.decoded - rescue Mail::Field::IncompleteParseError - # Never mind, move on to the next header + begin + hash[field.name.downcase] << field.decoded + rescue Mail::Field::IncompleteParseError + # Never mind, move on to the next header + end end end end