Patch Mailer for testing
This commit is contained in:
parent
e61b409838
commit
8680152e19
2 changed files with 6 additions and 2 deletions
|
@ -32,3 +32,7 @@ config :recycledcloud, :ldap,
|
||||||
base_dn: "dc=example,dc=org",
|
base_dn: "dc=example,dc=org",
|
||||||
bind_dn: "cn=admin,dc=example,dc=org",
|
bind_dn: "cn=admin,dc=example,dc=org",
|
||||||
bind_pw: "admin"
|
bind_pw: "admin"
|
||||||
|
|
||||||
|
# Send emails to local memory for testing.
|
||||||
|
config :recycledcloud, RecycledCloud.Mailer,
|
||||||
|
adapter: Bamboo.LocalAdapter
|
||||||
|
|
|
@ -3,13 +3,13 @@ defmodule RecycledCloud.Accounts.UserNotifier do
|
||||||
import Bamboo.Email
|
import Bamboo.Email
|
||||||
|
|
||||||
defp deliver(to, body) do
|
defp deliver(to, body) do
|
||||||
msg = Mailer.template()
|
_msg = Mailer.template()
|
||||||
|> to(to)
|
|> to(to)
|
||||||
|> subject("Recycled Cloud User Management Notification")
|
|> subject("Recycled Cloud User Management Notification")
|
||||||
|> text_body(body)
|
|> text_body(body)
|
||||||
|> Mailer.deliver_now()
|
|> Mailer.deliver_now()
|
||||||
|
|
||||||
{:ok, msg}
|
{:ok, %{to: to, body: body}}
|
||||||
end
|
end
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
|
|
Loading…
Reference in a new issue