Class: ActionMailbox::Ingresses::Ses::InboundEmailsController
- Inherits:
-
BaseController
- Object
- BaseController
- ActionMailbox::Ingresses::Ses::InboundEmailsController
- Defined in:
- app/controllers/action_mailbox/ingresses/ses/inbound_emails_controller.rb
Overview
Ingests inbound emails from Amazon SES/SNS and confirms subscriptions.
Subscription requests must provide the following parameters in a JSON body:
-
Message: Notification content -
MessageId: Notification unique identifier -
Timestamp: iso8601 timestamp -
TopicArn: Topic identifier -
Type: Type of event (“Subscription”)
Inbound email events must provide the following parameters in a JSON body:
-
Message: Notification content -
MessageId: Notification unique identifier -
Timestamp: iso8601 timestamp -
SubscribeURL: Topic identifier -
TopicArn: Topic identifier -
Type: Type of event (“SubscriptionConfirmation”)
All requests are authenticated by validating the provided AWS signature.
Returns:
-
204 No Contentif a request is successfully processed -
401 Unauthorizedif a request does not contain a valid signature -
404 Not Foundif the Amazon ingress has not been configured -
422 Unprocessable Entityif a request provides invalid parameters
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
36 37 38 39 40 41 |
# File 'app/controllers/action_mailbox/ingresses/ses/inbound_emails_controller.rb', line 36 def create return head :bad_request unless notification..present? ActionMailbox::InboundEmail.(notification.) head :no_content end |