From a94407a2166b190376a9f0c13d3136d0a3c6e545 Mon Sep 17 00:00:00 2001 From: shibao Date: Sun, 27 Nov 2022 12:03:51 -0500 Subject: [PATCH] fix bug with email --- config/runtime.exs | 2 +- lib/memex/accounts/email.ex | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/runtime.exs b/config/runtime.exs index bb4240b..b1e8c32 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -79,7 +79,7 @@ if config_env() == :prod do password: System.get_env("SMTP_PASSWORD") || raise("No SMTP_PASSWORD set!"), ssl: System.get_env("SMTP_SSL") == "true", email_from: System.get_env("EMAIL_FROM") || "no-reply@#{System.get_env("HOST")}", - email_name: System.get_env("EMAIL_NAME") || "Memex" + email_name: System.get_env("EMAIL_NAME") || "memEx" # ## Using releases # diff --git a/lib/memex/accounts/email.ex b/lib/memex/accounts/email.ex index 791693d..3bd4cdd 100644 --- a/lib/memex/accounts/email.ex +++ b/lib/memex/accounts/email.ex @@ -19,8 +19,8 @@ defmodule Memex.Email do @spec base_email(User.t(), String.t()) :: t() defp base_email(%User{email: email}, subject) do - from = Application.get_env(:Memex, Memex.Mailer)[:email_from] || "noreply@localhost" - name = Application.get_env(:Memex, Memex.Mailer)[:email_name] + from = Application.get_env(:memex, Memex.Mailer)[:email_from] || "noreply@localhost" + name = Application.get_env(:memex, Memex.Mailer)[:email_name] new() |> to(email) |> from({name, from}) |> subject(subject) end