From 57cb8d7924195c770499e69ab90eb3b978035f46 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Thu, 17 Jan 2019 14:19:37 -0600 Subject: Use create_and_extract_message_id! to create an inbound email. This makes sure the created email has checksum and message id columns set. --- .../rails/conductor/action_mailbox/inbound_emails_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'actionmailbox') diff --git a/actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb b/actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb index 3537a983ef..2cde3db8a0 100644 --- a/actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb +++ b/actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb @@ -28,8 +28,7 @@ module Rails end def create_inbound_email(mail) - ActionMailbox::InboundEmail.create! raw_email: \ - { io: StringIO.new(mail.to_s), filename: "inbound.eml", content_type: "message/rfc822" } + ActionMailbox::InboundEmail.create_and_extract_message_id!(mail.to_s) end end end -- cgit v1.2.3