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 contentMessageId: Notification unique identifierTimestamp: iso8601 timestampTopicArn: Topic identifierType: Type of event ("Subscription")
Inbound email events must provide the following parameters in a JSON body:
Message: Notification contentMessageId: Notification unique identifierTimestamp: iso8601 timestampSubscribeURL: Topic identifierTopicArn: Topic identifierType: Type of event ("SubscriptionConfirmation")
All requests are authenticated by validating the provided AWS signature.
Returns:
- 204 No Content if a request is successfully processed
- 401 Unauthorized if a request does not contain a valid signature
- 404 Not Found if the Amazon ingress has not been configured
- 422 Unprocessable Entity if 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 |