REFACTOR: use same code path for handling emails via API and POP

This commit is contained in:
Régis Hanol
2016-06-22 15:50:49 +02:00
parent 6e4ff45e44
commit 2ecd0da59f
3 changed files with 105 additions and 95 deletions

View File

@@ -52,7 +52,7 @@ class Admin::EmailController < Admin::AdminController
def handle_mail
params.require(:email)
Email::Receiver.new(params[:email]).process!
Email::Processor.process!(params[:email])
render text: "email was processed"
end