Bamboo Elastic Email Adapter v1.2.0 Bamboo.ElasticEmailAdapter View Source
Sends email using ElasticEmail's JSON API.
Use this adapter to send emails through ElasticEmail's API. Requires that an API key is set in the config.
This version is extracted from a hastily-constructed adapter for a Kinetic Commerce project. It makes several assumptions that will be broken in a future release:
- It always puts a
charset
ofutf-8
. - It cannot send emails from Elastic Email templates.
- All emails are currently sent as transactional.
- It always passes
ssl_options: [versions: [:"tlsv1.2"]]
to Hackney.
Example config
# In config/config.exs, or config/prod.exs, etc.
config :my_app, MyApp.Mailer,
adapter: Bamboo.ElasticEmailAdapter,
api_key: "my_api_key"
# Define a Mailer. Maybe in lib/my_app/mailer.ex
defmodule MyApp.Mailer do
use Bamboo.Mailer, otp_app: :my_app
end