An Aliyun adapter for the Bamboo.
The package can be installed
by adding bamboo_aliyun
to your list of dependencies in mix.exs
:
def deps do
[{:bamboo_aliyun, "~> 0.2.0"}]
end
In config/config.exs
, or config.prod.exs
, etc.
config :my_app, MyApp.Mailer,
adapter: Bamboo.AliyunAdapter,
uri: "https://dm.aliyuncs.com",
version: "2015-11-23",
region_id: "cn-hangzhou",
access_key_id: "sample",
access_key_secret: "secret",
address_type: 1,
reply_to_address: true,
click_trace: 1
import Bamboo.Email
email =
new_email()
|> from({"Bender", "notify@send1.example.com"})
|> to(user)
|> subject("Welcome!")
|> text_body("Welcome to the app")
|> html_body("<strong>Welcome to the app</strong>")