2018-09-18 01:32:05 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
Rails.application.routes.draw do
|
2018-10-17 08:53:37 -04:00
|
|
|
scope "/rails/action_mailbox", module: "action_mailbox/ingresses" do
|
2018-12-31 18:16:44 -05:00
|
|
|
post "/postmark/inbound_emails" => "postmark/inbound_emails#create", as: :rails_postmark_inbound_emails
|
2019-01-12 21:38:26 -05:00
|
|
|
post "/relay/inbound_emails" => "relay/inbound_emails#create", as: :rails_relay_inbound_emails
|
2018-10-17 08:53:37 -04:00
|
|
|
post "/sendgrid/inbound_emails" => "sendgrid/inbound_emails#create", as: :rails_sendgrid_inbound_emails
|
2018-10-06 22:02:08 -04:00
|
|
|
|
2020-03-22 14:26:13 -04:00
|
|
|
# Mandrill checks for the existence of a URL with a HEAD request before it will create the webhook.
|
|
|
|
get "/mandrill/inbound_emails" => "mandrill/inbound_emails#health_check", as: :rails_mandrill_inbound_health_check
|
|
|
|
post "/mandrill/inbound_emails" => "mandrill/inbound_emails#create", as: :rails_mandrill_inbound_emails
|
|
|
|
|
2018-10-17 08:53:37 -04:00
|
|
|
# Mailgun requires that a webhook's URL end in 'mime' for it to receive the raw contents of emails.
|
|
|
|
post "/mailgun/inbound_emails/mime" => "mailgun/inbound_emails#create", as: :rails_mailgun_inbound_emails
|
2018-10-06 22:02:08 -04:00
|
|
|
end
|
2018-09-27 20:39:13 -04:00
|
|
|
|
|
|
|
# TODO: Should these be mounted within the engine only?
|
2018-09-28 15:19:43 -04:00
|
|
|
scope "rails/conductor/action_mailbox/", module: "rails/conductor/action_mailbox" do
|
2018-11-22 16:40:30 -05:00
|
|
|
resources :inbound_emails, as: :rails_conductor_inbound_emails
|
2020-03-31 19:46:13 -04:00
|
|
|
get "inbound_emails/sources/new", to: "inbound_emails/sources#new", as: :new_rails_conductor_inbound_email_source
|
|
|
|
post "inbound_emails/sources", to: "inbound_emails/sources#create", as: :rails_conductor_inbound_email_sources
|
|
|
|
|
2018-11-22 16:40:30 -05:00
|
|
|
post ":inbound_email_id/reroute" => "reroutes#create", as: :rails_conductor_inbound_email_reroute
|
2021-06-19 14:59:59 -04:00
|
|
|
post ":inbound_email_id/incinerate" => "incinerates#create", as: :rails_conductor_inbound_email_incinerate
|
2018-09-18 01:32:05 -04:00
|
|
|
end
|
|
|
|
end
|