This is all you really need to know in order to make Action Mailbox work in development.
- Fire up
ngrok http 3000and 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:installrake db:migraterails 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.ymlis monitoring theaction_mailbox_routingqueue. - Configure your
application_mailbox.rbwith whatever routing you need; example below. - Configure your
incoming_mailbox.rbas you wish; example below.
You should now be able to send an email to test@MAILGUN-SANDBOX-DOMAIN.