View Source API Reference Bamboo Config Adapter v1.1.0
Modules
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
Delivering mail
def welcome do
email
|> Bamboo.ConfigAdapter.Email.put_config(%{server: "smtp.other_domain"})
|> Mailer.deliver_now()
end
def welcome_runtime_adapter do
Used to update emails with configuration overrides for BamBoo.ConfigAdapter