mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-20 06:37:59 +01:00
9 lines
283 B
Elixir
9 lines
283 B
Elixir
defmodule Philomena.Mailer do
|
|
use Swoosh.Mailer, otp_app: :philomena
|
|
|
|
@spec deliver_later(Swoosh.Email.t()) :: {:ok, Swoosh.Email.t()}
|
|
def deliver_later(mail) do
|
|
Task.Supervisor.start_child(Philomena.AsyncEmailSupervisor, fn -> deliver(mail) end)
|
|
{:ok, mail}
|
|
end
|
|
end
|