From 11045d7773ca990a7427a51b9997ac91155bf249 Mon Sep 17 00:00:00 2001 From: Nikola Begedin Date: Mon, 23 Jan 2017 21:31:15 +0100 Subject: [PATCH] Add Postmark adapter for Bamboo emails --- .env.example | 1 + config/prod.exs | 3 ++- config/staging.exs | 3 ++- mix.exs | 1 + mix.lock | 1 + priv/repo/structure.sql | 4 ++-- 6 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index d4c59807a..915788452 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,7 @@ export AWS_ACCESS_KEY_ID= export AWS_SECRET_ACCESS_KEY= export CLOUDFRONT_DOMAIN= +export POSTMARK_API_KEY= export S3_BUCKET= export SEGMENT_WRITE_KEY= export SENTRY_DSN= diff --git a/config/prod.exs b/config/prod.exs index ac04d691b..1b8c073b3 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -55,7 +55,8 @@ config :sentry, # TODO: Replace with actual adapter config :code_corps, CodeCorps.Mailer, - adapter: Bamboo.LocalAdapter + adapter: Bamboo.PostmarkAdapter, + api_key: System.get_env("POSTMARK_API_KEY") # ## SSL Support # diff --git a/config/staging.exs b/config/staging.exs index db2b8cb15..7a3f9a27f 100644 --- a/config/staging.exs +++ b/config/staging.exs @@ -53,7 +53,8 @@ config :code_corps, :stripe, Stripe config :code_corps, :stripe_env, :staging config :code_corps, CodeCorps.Mailer, - adapter: Bamboo.LocalAdapter + adapter: Bamboo.PostmarkAdapter, + api_key: System.get_env("POSTMARK_API_KEY") # ## SSL Support # diff --git a/mix.exs b/mix.exs index a8d98594e..dabdb2368 100644 --- a/mix.exs +++ b/mix.exs @@ -58,6 +58,7 @@ defmodule CodeCorps.Mixfile do defp deps do [ {:bamboo, "~> 0.7"}, # emails + {:bamboo_postmark, "~> 0.2.0"}, # postmark adapter for emails {:phoenix, "~> 1.2.1"}, {:phoenix_pubsub, "~> 1.0"}, {:phoenix_ecto, "~> 3.0"}, diff --git a/mix.lock b/mix.lock index d32dd9e9d..549b1283c 100644 --- a/mix.lock +++ b/mix.lock @@ -1,6 +1,7 @@ %{"arc": {:hex, :arc, "0.6.0", "f4ef95b4e72ec5bce8db3474245e8202938b45e431adb34b20a8cda18d98373b", [:mix], [{:ex_aws, "~> 1.0.0", [hex: :ex_aws, optional: true]}, {:httpoison, "~> 0.8", [hex: :httpoison, optional: false]}, {:poison, "~> 2.0 or ~> 3.0", [hex: :poison, optional: true]}, {:sweet_xml, "~> 0.5", [hex: :sweet_xml, optional: true]}]}, "arc_ecto": {:hex, :arc_ecto, "0.5.0", "ae5369e3c9a956bd7eacf1d8e2163970cfc2cf6c2e9ce79eeef91888e6f6a05e", [:mix], [{:arc, "~> 0.6.0", [hex: :arc, optional: false]}, {:ecto, "~> 2.0", [hex: :ecto, optional: false]}]}, "bamboo": {:hex, :bamboo, "0.8.0", "573889a3efcb906bb9d25a1c4caa4ca22f479235e1b8cc3260d8b88dabeb4b14", [:mix], [{:hackney, "~> 1.6", [hex: :hackney, optional: false]}, {:plug, "~> 1.0", [hex: :plug, optional: false]}, {:poison, ">= 1.5.0", [hex: :poison, optional: false]}]}, + "bamboo_postmark": {:hex, :bamboo_postmark, "0.2.0", "9c51d09b4e619559d5a98054a603ed6f1157f5ba59847b9748ecbb49896e16fc", [:mix], [{:bamboo, "~> 0.5", [hex: :bamboo, optional: false]}, {:hackney, "~> 1.6", [hex: :hackney, optional: false]}, {:plug, "~> 1.0", [hex: :plug, optional: false]}, {:poison, ">= 1.5.0", [hex: :poison, optional: false]}]}, "base64url": {:hex, :base64url, "0.0.1", "36a90125f5948e3afd7be97662a1504b934dd5dac78451ca6e9abf85a10286be", [:rebar], []}, "benchfella": {:hex, :benchfella, "0.3.3", "bbde48b5fe1ef556baa7ad933008e214e050e81ddb0916350715f5759fb35c0c", [:mix], []}, "bunt": {:hex, :bunt, "0.1.6", "5d95a6882f73f3b9969fdfd1953798046664e6f77ec4e486e6fafc7caad97c6f", [:mix], []}, diff --git a/priv/repo/structure.sql b/priv/repo/structure.sql index 800f2fffb..79a604de9 100644 --- a/priv/repo/structure.sql +++ b/priv/repo/structure.sql @@ -2,8 +2,8 @@ -- PostgreSQL database dump -- --- Dumped from database version 9.5.4 --- Dumped by pg_dump version 9.5.4 +-- Dumped from database version 9.5.1 +-- Dumped by pg_dump version 9.5.1 SET statement_timeout = 0; SET lock_timeout = 0;