mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FEATURE: add handle_mail admin route
you can post full email payloads to this endpoint /admin/email/handle_mail
This commit is contained in:
parent
b117c2541d
commit
dc859beff3
2 changed files with 7 additions and 0 deletions
|
@ -38,6 +38,12 @@ class Admin::EmailController < Admin::AdminController
|
|||
render json: MultiJson.dump(html_content: renderer.html, text_content: renderer.text)
|
||||
end
|
||||
|
||||
def handle_mail
|
||||
params.require(:email)
|
||||
Email::Receiver.new(params[:email]).process
|
||||
render text: "email was processed"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def filter_email_logs(email_logs, params)
|
||||
|
|
|
@ -120,6 +120,7 @@ Discourse::Application.routes.draw do
|
|||
get "sent"
|
||||
get "skipped"
|
||||
get "preview-digest" => "email#preview_digest"
|
||||
post "handle_mail"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue