test: add tests for smtp mailer config
This commit is contained in:
parent
f53a3ce3cc
commit
c4135308e6
9 changed files with 440 additions and 0 deletions
|
|
@ -16,4 +16,15 @@ defmodule Mv.Mailer do
|
|||
def mail_from do
|
||||
Application.get_env(:mv, :mail_from, {"Mila", "noreply@example.com"})
|
||||
end
|
||||
|
||||
@doc """
|
||||
Sends a test email to the given address. Used from Global Settings SMTP section.
|
||||
|
||||
Returns `{:ok, email}` on success, `{:error, reason}` on failure (e.g. invalid address,
|
||||
SMTP not configured, connection error). Stub: always returns error until implemented.
|
||||
"""
|
||||
@spec send_test_email(String.t()) :: {:ok, Swoosh.Email.t()} | {:error, term()}
|
||||
def send_test_email(_to_email) do
|
||||
{:error, :not_implemented}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue