https://github.com/prosapient/bamboo_fallback
https://github.com/prosapient/bamboo_fallback
adapter bamboo
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/prosapient/bamboo_fallback
- Owner: prosapient
- License: apache-2.0
- Created: 2018-12-21T15:43:35.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-04-28T15:10:14.000Z (over 4 years ago)
- Last Synced: 2024-10-21T00:36:18.513Z (12 months ago)
- Topics: adapter, bamboo
- Language: Elixir
- Size: 15.6 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Bamboo.FallbackAdapter
An adapter for the [Bamboo](https://github.com/thoughtbot/bamboo) email app.
Allows you to compose multiple adapters to increase the guarantee of delivering.
It applies adapters one by one and fails only when all adapters fail.## Installation
The package can be installed by adding `bamboo_fallback` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:bamboo_fallback, "~> 2.0"}
]
end
```## Config
```elixir
config :myapp, MyApp.Mailer,
adapter: Bamboo.FallbackAdapter,
fallback_options: [
{Bamboo.SendGridAdapter, api_key: "SENDGRID_API_KEY"},
{Bamboo.MailgunAdapter, api_key: "MAILGUN_API_KEY", domain: "MAILGUN_DOMAIN"}
]
```
This example uses `SendGridAdapter` as a primary adapter and `MailgunAdapter` as a secondary one.
You can use as many adapters as you want.