Skip to content

Commit a140093

Browse files
committed
Avoid partial merging of system mailer config with sender config
1 parent 8c3166b commit a140093

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

config/runtime.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ if config_env() == :prod do
114114
end)
115115
end
116116

117-
config(:keila, Keila.Mailer, config)
117+
config(:keila, Keila.Auth.Emails, config)
118118
rescue
119119
e ->
120120
exit_from_exception.(e, """

lib/keila/auth/emails.ex

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ defmodule Keila.Auth.Emails do
55

66
@spec send!(atom(), map()) :: term() | no_return()
77
def send!(email, params) do
8+
config = Application.get_env(:keila, __MODULE__, [])
9+
810
email
911
|> build(params)
10-
|> Keila.Mailer.deliver!()
12+
|> Keila.Mailer.deliver!(config)
1113
end
1214

1315
@spec build(:activate, %{url: String.t(), user: Keila.Auth.User.t()}) :: term() | no_return()

0 commit comments

Comments
 (0)