feat: provide clear errors for missing required envs
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
f8a3cc4c47
commit
61952f986d
6 changed files with 146 additions and 27 deletions
|
|
@ -100,7 +100,11 @@ defmodule Mv.Mailer do
|
|||
"""
|
||||
@spec smtp_config() :: keyword()
|
||||
def smtp_config do
|
||||
if Mv.Config.smtp_configured?() and not boot_smtp_configured?() do
|
||||
# In test we use Swoosh.Adapters.Test; do not override with SMTP opts or emails would not land in the test mailbox.
|
||||
adapter = Application.get_env(:mv, __MODULE__, []) |> Keyword.get(:adapter)
|
||||
|
||||
if Mv.Config.smtp_configured?() and not boot_smtp_configured?() and
|
||||
adapter != Swoosh.Adapters.Test do
|
||||
verify_mode =
|
||||
if Application.get_env(:mv, :smtp_verify_peer, false),
|
||||
do: :verify_peer,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue