Code Monkey home page Code Monkey logo

Comments (4)

bobf avatar bobf commented on July 19, 2024 1

@romarioliveira25 I finally managed to find some time to look at this.

I was able to recreate the error:

[ActiveJob] [ActionMailbox::RoutingJob] [531cb2d2-d35d-484f-8d53-de7b2b937b4a] Error performing ActionMailbox::RoutingJob (Job ID: 531cb2d2-d35d-484f-8d53-de7b2b937b4a) from Async(action_mailbox_routing) in 39.07ms: ActionMailbox::Router::RoutingError (ActionMailbox::Router::RoutingError):

You just need to add some extra ActionMailbox configuration:

# app/mailboxes/application_mailbox.rb

class ApplicationMailbox < ActionMailbox::Base
  routing /.*/ => :defaults
end
# app/mailboxes/defaults_mailbox.rb
class DefaultsMailbox < ApplicationMailbox
  def process
    puts mail
  end
end

You'll need to adjust to suit your needs but you need to define at least one route so Rails/ActionMailbox will know where to route the incoming mail to.

I've created a demo repository for you here: https://github.com/bobf/action_mailbox_amazon_ingress_demo

You'll need to edit config/application.rb to set the ARN for the SNS topic but otherwise it should work out of the box - I tested using Ngrok and had no issues.

See this documentation for further reference: https://api.rubyonrails.org/classes/ActionMailbox/Base.html

Let me know how it goes !

from action_mailbox_amazon_ingress.

bobf avatar bobf commented on July 19, 2024

@romarioliveira25 Hi, thanks for providing a detailed error report - I will try to take a closer look at this in my free time.

For the time being, you may be interested in this PR which (hopefully !) will mean SES integration will be included in Rails 6.1 - I am just waiting for the Rails devs to approve/provide further feedback on the PR: rails/rails#39364

Will try to get back to you this weekend on your issues with the standalone gem.

from action_mailbox_amazon_ingress.

romarioliveira25 avatar romarioliveira25 commented on July 19, 2024

Perfect! Thank's for your time.
And I found your gem at the rails PR haha

from action_mailbox_amazon_ingress.

romarioliveira25 avatar romarioliveira25 commented on July 19, 2024

Hi again @bobf, one more time, thanks for your support.

I'm really wasn't create a default routing (although I'm not sure that issue is related with that)

About the SNS topic, I did the config as mentioned at the docs shared by you at the repo.

So, while I was waiting for your response, I have tested the griddler gem, but with that I checked one limitation to use AWS SES for receive email purposes related to the large payload, because I need receive emails with attachments and it exceeds the limit of 256KB in AWS SNS Notification.

AWS docs: https://docs.aws.amazon.com/sns/latest/dg/sns-large-payload-raw-message-delivery.html

from action_mailbox_amazon_ingress.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.