https://github.com/linjunpop/bamboo_aliyun
🎍 An Aliyun adapter for the Bamboo.
https://github.com/linjunpop/bamboo_aliyun
aliyun bamboo elixir email
Last synced: about 1 month ago
JSON representation
🎍 An Aliyun adapter for the Bamboo.
- Host: GitHub
- URL: https://github.com/linjunpop/bamboo_aliyun
- Owner: linjunpop
- License: mit
- Created: 2017-09-14T02:57:57.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-20T14:34:07.000Z (over 7 years ago)
- Last Synced: 2025-02-09T17:46:49.288Z (8 months ago)
- Topics: aliyun, bamboo, elixir, email
- Language: Elixir
- Homepage: https://hex.pm/packages/bamboo_aliyun
- Size: 41 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Bamboo.AliyunAdapter
An [Aliyun](https://www.aliyun.com/product/directmail?spm=5176.8142029.388261.228.dKDNYN) adapter for the [Bamboo](https://github.com/thoughtbot/bamboo).
## Installation
The package can be installed
by adding `bamboo_aliyun` to your list of dependencies in `mix.exs`:```elixir
def deps do
[{:bamboo_aliyun, "~> 0.2.0"}]
end
```In `config/config.exs`, or `config.prod.exs`, etc.
```elixir
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
```## Usage
### Send standard email
```elixir
import Bamboo.Emailemail =
new_email()
|> from({"Bender", "notify@send1.example.com"})
|> to(user)
|> subject("Welcome!")
|> text_body("Welcome to the app")
|> html_body("Welcome to the app")
```## Docs
[https://hexdocs.pm/bamboo_aliyun](https://hexdocs.pm/bamboo_aliyun).