aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/action_mailroom/inbound_emails_controller.rb2
-rw-r--r--app/models/action_mailroom/inbound_email.rb2
2 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/action_mailroom/inbound_emails_controller.rb b/app/controllers/action_mailroom/inbound_emails_controller.rb
index 2aa2a89323..cf44367b7b 100644
--- a/app/controllers/action_mailroom/inbound_emails_controller.rb
+++ b/app/controllers/action_mailroom/inbound_emails_controller.rb
@@ -1,4 +1,6 @@
# TODO: Add access protection using basic auth with verified tokens. Maybe coming from credentials by default?
+# TODO: Spam/malware catching?
+# TODO: Specific bounces for SMTP good citizenship: 200/404/400
class ActionMailroom::InboundEmailsController < ActionController::Base
skip_forgery_protection
before_action :require_rfc822_message
diff --git a/app/models/action_mailroom/inbound_email.rb b/app/models/action_mailroom/inbound_email.rb
index 7ec54763b1..f9842eead7 100644
--- a/app/models/action_mailroom/inbound_email.rb
+++ b/app/models/action_mailroom/inbound_email.rb
@@ -20,6 +20,8 @@ class ActionMailroom::InboundEmail < ActiveRecord::Base
private
def extract_message_id(raw_email)
mail_from_raw_content(raw_email.read).message_id
+ rescue => e
+ # TODO: Assign message id if it can't be extracted?
end
end