Patch Mailer for testing

This commit is contained in:
Timothée Floure 2021-01-12 16:25:27 +01:00
parent e61b409838
commit 8680152e19
Signed by: tfloure
GPG key ID: 4502C902C00A1E12
2 changed files with 6 additions and 2 deletions

View file

@ -32,3 +32,7 @@ config :recycledcloud, :ldap,
base_dn: "dc=example,dc=org",
bind_dn: "cn=admin,dc=example,dc=org",
bind_pw: "admin"
# Send emails to local memory for testing.
config :recycledcloud, RecycledCloud.Mailer,
adapter: Bamboo.LocalAdapter

View file

@ -3,13 +3,13 @@ defmodule RecycledCloud.Accounts.UserNotifier do
import Bamboo.Email
defp deliver(to, body) do
msg = Mailer.template()
_msg = Mailer.template()
|> to(to)
|> subject("Recycled Cloud User Management Notification")
|> text_body(body)
|> Mailer.deliver_now()
{:ok, msg}
{:ok, %{to: to, body: body}}
end
@doc """