Bamboo Config Adapter v0.2.0 Bamboo.ConfigAdapter View Source
Example using SMTPAdapter
Config
config :my_app, MyApp.Mailer,
adapter: Bamboo.ConfigAdapter,
chained_adapter: Bamboo.SMTPAdapter,
server: "smtp.domain",
hostname: "www.mydomain.com",
username: "your.name@your.domain", # or {:system, "SMTP_USERNAME"}
password: "pa55word", # or {:system, "SMTP_PASSWORD"}
Or if chained adapter is configured completely at runtime
config :my_app, MyApp.Mailer,
adapter: Bamboo.ConfigAdapter,
chained_adapter: Bamboo.SMTPAdapter
Delivering mail
def welcome do
email
|> Bamboo.ConfigAdapter.put_config(%{server: "smtp.other_domain)})
|> Mailer.deliver_now()
end
Link to this section Summary
Functions
Callback implementation for Bamboo.Adapter.deliver/2
Callback implementation for Bamboo.Adapter.handle_config/1
Link to this section Functions
Callback implementation for Bamboo.Adapter.deliver/2
.
Callback implementation for Bamboo.Adapter.handle_config/1
.