A PostageApp Adapter for the Bamboo email library.
API Documentation • Knowledge Base • Help Portal
Installation
Add bamboo_postageapp
to your list of dependencies in mix.exs
:
def deps do
[{:bamboo_postageapp, "~> 0.0.1"}]
end
Add PostageApp to your config:
# In your configuration file:
# * General configuration: config/config.exs
# * Recommended production only: config/prod.exs
#
# `recipient_override` setting is useful for staging environment when you might
# have real users and don't want to send emails to them.
config :my_app, MyApp.Mailer,
adapter: Bamboo.PostageAppAdapter,
api_key: "API_KEY",
recipient_override: "override@example.org"
PostageApp specific email helpers
PostageApp allows you to use custom message templates and apply variables like so:
defmodule MyApp.Mail do
import Bamboo.PostageAppHelper
def some_email do
new_email()
|> to("to@example.com")
|> postageapp_template("template-name")
|> postageapp_variables(%{foo: "123", bar: "abc"})
end
end
Copyright
(C) 2017 Oleg Khabarov