Skip to content
Snippets Groups Projects

ingress

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Justin Back
    Edited
    inbound_emails_controller.rb 478 B
    # frozen_string_literal: true
    
    module ActionMailbox
      class Ingresses::Postal::InboundEmailsController < ActionMailbox::BaseController
        #before_action :authenticate_by_password
    
        def create
          ActionMailbox::InboundEmail.create_and_extract_message_id! Base64.decode64(params.require("message"))
        rescue ActionController::ParameterMissing => error
          logger.error <<~MESSAGE
            #{error.message}
          MESSAGE
          head :unprocessable_entity
        end
      end
    end
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment