Skip to content

GBH/bamboo_postageapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bamboo.PostageAppAdapter Hex.pm Build Status

A PostageApp Adapter for the Bamboo email library.

Installation

Add bamboo_postageapp to your list of dependencies in mix.exs:

def deps do
  [{:bamboo_postageapp, "~> 0.0.1"}]
end

Add PostageApp to your config:

# 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:

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

About

A Bamboo adapter for PostageApp

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages