Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/linjunpop/bamboo_sendcloud
🎍 A Sendcloud adapter for the Bamboo.
https://github.com/linjunpop/bamboo_sendcloud
bamboo elixir email sendcloud
Last synced: about 2 months ago
JSON representation
🎍 A Sendcloud adapter for the Bamboo.
- Host: GitHub
- URL: https://github.com/linjunpop/bamboo_sendcloud
- Owner: linjunpop
- License: mit
- Created: 2017-03-24T02:47:13.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-27T08:32:55.000Z (almost 7 years ago)
- Last Synced: 2024-10-29T01:27:13.885Z (2 months ago)
- Topics: bamboo, elixir, email, sendcloud
- Language: Elixir
- Homepage: https://hex.pm/packages/bamboo_sendcloud
- Size: 25.4 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Bamboo.SendcloudAdapter
A [Sendcloud](https://www.sendcloud.net) adapter for the [Bamboo](https://github.com/thoughtbot/bamboo).
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `bamboo_sendcloud` to your list of dependencies in `mix.exs`:```elixir
def deps do
[{:bamboo_sendcloud, "~> 0.2.0"}]
end
```In `config/config.exs`, or `config.prod.exs`, etc.
```elixir
config :my_app, MyApp.Mailer,
adapter: Bamboo.SendcloudAdapter,
api_user: "my_api_user",
api_key: "my_api_key"
```## Usage
### Send standard email
```elixir
import Bamboo.Emailemail =
new_email()
|> from({"Bender", "[email protected]"})
|> to(user)
|> subject("Welcome!")
|> text_body("Welcome to the app")
|> html_body("Welcome to the app")
```### Send template email
```elixir
import Bamboo.Emailemail =
new_email()
|> from({"Bender", "[email protected]"})
|> to(user)
|> SendcloudHelper.template("reset_password", %{"%link%" => [reset_password_link]})
```## Docs
[https://hexdocs.pm/bamboo_sendcloud](https://hexdocs.pm/bamboo_sendcloud).