diff options
Diffstat (limited to 'app/models/action_mailroom')
-rw-r--r-- | app/models/action_mailroom/inbound_email.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/action_mailroom/inbound_email.rb b/app/models/action_mailroom/inbound_email.rb index 755d7be138..62614abb95 100644 --- a/app/models/action_mailroom/inbound_email.rb +++ b/app/models/action_mailroom/inbound_email.rb @@ -1,7 +1,9 @@ +require "mail" + class ActionMailroom::InboundEmail < ActiveRecord::Base self.table_name = "action_mailroom_inbound_emails" - has_one_attached :raw_message + has_one_attached :raw_email enum status: %i[ pending processing delivered failed bounced ] @@ -9,7 +11,7 @@ class ActionMailroom::InboundEmail < ActiveRecord::Base def mail - @mail ||= Mail.new(Mail::Utilities.binary_unsafe_to_crlf(raw_message.download)) + @mail ||= Mail.new(Mail::Utilities.binary_unsafe_to_crlf(raw_email.download)) end private |