Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit b2f8973

Browse files
mydearxymmydearxym
authored andcommitted
feat: 🎸 mailer
add bool switch to control send or not
1 parent 3cc2483 commit b2f8973

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lib/groupher_server/mailer/email.ex

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,12 @@ defmodule GroupherServer.Email do
9090
def notify_admin(%{type: type, title: title} = info, :new_content) do
9191
case @conf_notify_admin_on_content_created do
9292
true ->
93-
hello =
94-
base_mail()
95-
|> to(@admin_email)
96-
|> subject("new #{type}: #{title}")
97-
|> html_body(Templates.NotifyAdminOnContentCreated.html(info))
98-
|> text_body(Templates.NotifyAdminRegister.text())
99-
|> Mailer.deliver_later()
93+
base_mail()
94+
|> to(@admin_email)
95+
|> subject("new #{type}: #{title}")
96+
|> html_body(Templates.NotifyAdminOnContentCreated.html(info))
97+
|> text_body(Templates.NotifyAdminOnContentCreated.text(info))
98+
|> Mailer.deliver_later()
10099

101100
false ->
102101
{:ok, :pass}

0 commit comments

Comments
 (0)