aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailbox
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2019-01-17 14:19:37 -0600
committerPratik Naik <pratiknaik@gmail.com>2019-01-17 14:19:37 -0600
commit57cb8d7924195c770499e69ab90eb3b978035f46 (patch)
treed5b3732df015b6bc893478600c7d2273cb58734c /actionmailbox
parenta823b7d56f53ecfda6802343d83d8da45e5cb3b1 (diff)
downloadrails-57cb8d7924195c770499e69ab90eb3b978035f46.tar.gz
rails-57cb8d7924195c770499e69ab90eb3b978035f46.tar.bz2
rails-57cb8d7924195c770499e69ab90eb3b978035f46.zip
Use create_and_extract_message_id! to create an inbound email.
This makes sure the created email has checksum and message id columns set.
Diffstat (limited to 'actionmailbox')
-rw-r--r--actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb3
1 files changed, 1 insertions, 2 deletions
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