https://github.com/gbh/bamboo_postageapp
A Bamboo adapter for PostageApp
https://github.com/gbh/bamboo_postageapp
bamboo elixir
Last synced: about 1 year ago
JSON representation
A Bamboo adapter for PostageApp
- Host: GitHub
- URL: https://github.com/gbh/bamboo_postageapp
- Owner: GBH
- License: mit
- Created: 2017-05-11T02:13:19.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-11T02:42:53.000Z (about 9 years ago)
- Last Synced: 2025-03-12T05:46:58.634Z (over 1 year ago)
- Topics: bamboo, elixir
- Language: Elixir
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bamboo.PostageAppAdapter [](https://hex.pm/packages/bamboo_postageapp) [](https://travis-ci.org/GBH/bamboo_postageapp)
A [PostageApp](https://postageapp.com/) Adapter for the [Bamboo](https://github.com/thoughtbot/bamboo) email library.
### [API Documentation](http://help.postageapp.com/kb/api/api-overview) • [Knowledge Base](http://help.postageapp.com/kb) • [Help Portal](http://help.postageapp.com/)
## Installation
Add `bamboo_postageapp` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:bamboo_postageapp, "~> 0.0.1"}]
end
```
Add PostageApp to your config:
```elixir
# 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:
```elixir
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