1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Workers.MailerWorker do
6 use Pleroma.Workers.WorkerHelper, queue: "mailer"
9 def perform(%Job{args: %{"op" => "email", "encoded_email" => encoded_email, "config" => config}}) do
12 |> :erlang.binary_to_term()
13 |> Pleroma.Emails.Mailer.deliver(config)
17 def timeout(_job), do: :timer.seconds(5)