This is all you really need to know in order to make Action Mailbox work in development.
- Fire up
ngrok http 3000
and make note of your subdomain for steps 3 and 8. - Create a Mailgun account because they offer sandbox addresses; grab your domain from the Dashboard.
- Go into Receiving and create a catch-all route pointing to:
https://XXX.ngrok.io/rails/action_mailbox/mailgun/inbound_emails/mime
- Add your Mailgun API key to your credentials:
action_mailbox:
mailgun_api_key: API KEY HERE
rails action_mailbox:install
rake db:migrate
rails generate mailbox incoming
- Add the following to your
config/environments/development.rb
config.action_mailbox.ingress = :mailgun
config.hosts << "XXX.ngrok.io"
- Make sure your
config/sidekiq.yml
is monitoring theaction_mailbox_routing
queue. - Configure your
application_mailbox.rb
with whatever routing you need; example below. - Configure your
incoming_mailbox.rb
as you wish; example below.
You should now be able to send an email to test@MAILGUN-SANDBOX-DOMAIN.
Thank you very much, I will take everyone's suggestions seriously