diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/action_mailbox/inbound_email/message_id.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/action_mailbox/inbound_email/message_id.rb b/app/models/action_mailbox/inbound_email/message_id.rb index 4807a2a293..f10f59ea45 100644 --- a/app/models/action_mailbox/inbound_email/message_id.rb +++ b/app/models/action_mailbox/inbound_email/message_id.rb @@ -25,14 +25,14 @@ module ActionMailbox::InboundEmail::MessageId private def extract_message_id(source) - Mail.from_source(source).message_id - rescue => e - # FIXME: Add logging with "Couldn't extract Message ID, so will generating a new random ID instead" + Mail.from_source(source).message_id rescue nil end end private def generate_missing_message_id - self.message_id ||= Mail::MessageIdField.new.message_id + self.message_id ||= Mail::MessageIdField.new.message_id.tap do |message_id| + logger.warn "Message-ID couldn't be parsed or is missing. Generated a new Message-ID: #{message_id}" + end end end |