version chapril de mobilizon https://mobilizon.chapril.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mobilizon.chapril.org-mobil.../lib/web/email/mailer.ex

35 lines
764 B

defmodule Mobilizon.Web.Email.Mailer do
@moduledoc """
Mobilizon Mailer.
"""
use Bamboo.Mailer, otp_app: :mobilizon
def send_email_later(email) do
try do
Mobilizon.Web.Email.Mailer.deliver_later!(email)
rescue
error ->
Sentry.capture_exception(error,
stacktrace: __STACKTRACE__,
extra: %{extra: "Error while sending email"}
)
reraise error, __STACKTRACE__
end
end
def send_email(email) do
try do
Mobilizon.Web.Email.Mailer.deliver_now!(email)
rescue
error ->
Sentry.capture_exception(error,
stacktrace: __STACKTRACE__,
extra: %{extra: "Error while sending email"}
)
reraise error, __STACKTRACE__
end
end
end