configure mail

This commit is contained in:
2026-05-07 16:34:55 +01:00
parent a83634da36
commit b45e2af4dc
2 changed files with 18 additions and 1 deletions
+7 -1
View File
@@ -11,12 +11,18 @@ defmodule Firehose.Accounts.UserNotifier do
alias Firehose.Accounts.User
alias Firehose.Mailer
defp sender do
name = System.get_env("SENDER_NAME") || "Firehose"
email = System.get_env("SMTP_FROM_EMAIL") || "contact@example.com"
{name, email}
end
# Delivers the email using the application mailer.
defp deliver(recipient, subject, body) do
email =
new()
|> to(recipient)
|> from({"Firehose", "contact@example.com"})
|> from(sender())
|> subject(subject)
|> text_body(body)