diff --git a/config/runtime.exs b/config/runtime.exs index 888a3ea..266a8ca 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -146,10 +146,10 @@ if config_env() == :prod do # Also, you may need to configure the Swoosh API client of your choice if you # are not using SMTP. Here is an example of the configuration: # - # config :polar, Polar.Mailer, - # adapter: Swoosh.Adapters.Mailgun, - # api_key: System.get_env("MAILGUN_API_KEY"), - # domain: System.get_env("MAILGUN_DOMAIN") + config :polar, Polar.Mailer, + adapter: Swoosh.Adapters.Postmark, + api_key: System.get_env("POSTMARK_API_KEY") + # # For this example you need include a HTTP client required by Swoosh API client. # Swoosh supports Hackney and Finch out of the box: diff --git a/lib/polar/accounts/user_notifier.ex b/lib/polar/accounts/user_notifier.ex index f42456b..bab6767 100644 --- a/lib/polar/accounts/user_notifier.ex +++ b/lib/polar/accounts/user_notifier.ex @@ -5,10 +5,12 @@ defmodule Polar.Accounts.UserNotifier do # Delivers the email using the application mailer. defp deliver(recipient, subject, body) do + notifier = System.get_env("NOTIFIER_EMAIL", "images@opsmaru.com") + email = new() |> to(recipient) - |> from({"Polar", "contact@example.com"}) + |> from({"OpsMaru Image Server", notifier}) |> subject(subject) |> text_body(body) diff --git a/lib/polar_web/controllers/streams/item_controller.ex b/lib/polar_web/controllers/streams/item_controller.ex index 82e214c..9aa5dc0 100644 --- a/lib/polar_web/controllers/streams/item_controller.ex +++ b/lib/polar_web/controllers/streams/item_controller.ex @@ -20,7 +20,7 @@ defmodule PolarWeb.Streams.ItemController do endpoint = credential.space.cdn_host || default_cdn_host - url = Path.join(["https://", endpoint, bucket, item.path]) + url = Path.join(["https://", endpoint, item.path]) redirect(conn, external: url) end