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",
|
||||
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
|
||||
|
|
|
@ -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 """
|
||||
|
|
Loading…
Reference in a new issue