A delivery strategy for Bamboo that uses Oban. We haven't used this in a while, so it might not work anymore.
-
Add
bamboo
,oban
, andbamboo_oban_delivery_strategy
to yourmix.exs
:def deps do [ {:bamboo, "~> 1.0"}, {:oban, "~> 2.0"}, {:bamboo_oban_delivery_strategy, "~> 1.0"} # OR: {:bamboo_oban_delivery_strategy, github: "KineticCafe/bamboo_oban_delivery_strategy"} ] end
-
Follow the Bamboo Getting Started Guide.
-
Follow the Oban Installation guide
-
Add
Bamboo.ObanDeliveryStrategy
to your mailer configuration. Optionally configure the queue and maximum attempts.# In your config/config.exs file deliver_later_strategy = if Mix.env() == :test do Bamboo.ImmediateDeliveryStrategy else Bamboo.ObanDeliveryStrategy end config :my_app, MyApp.Mailer, deliver_later_strategy: deliver_later_strategy # Optional, but recommended. If not provided, defaults to "default" and 10 # attempts. configure :bamboo, ObanDeliveryStrategy, queue: "mailers", max_attempts: 15
We welcome your contributions, as described in Contributing.md. Like all Kinetic Cafe open source projects, is under the Kinetic Cafe Open Source Code of Conduct.