Handle sending mail more properly

With custom sentry reporting issues

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-04-20 15:02:24 +02:00
parent 9a65b29640
commit d98e68203e
10 changed files with 46 additions and 18 deletions

View File

@@ -90,7 +90,7 @@ defmodule Mobilizon.Web.Email.User do
def send_confirmation_email(%User{} = user, locale \\ "en") do
user
|> Email.User.confirmation_email(locale)
|> Email.Mailer.deliver_later()
|> Email.Mailer.send_email_later()
end
@doc """
@@ -135,7 +135,7 @@ defmodule Mobilizon.Web.Email.User do
{:ok, %Bamboo.Email{} = mail} <-
user_updated
|> Email.User.reset_password_email(locale)
|> Email.Mailer.deliver_later() do
|> Email.Mailer.send_email_later() do
{:ok, mail}
else
{:error, reason} -> {:error, reason}