1 defmodule Mix.Tasks.Pleroma.Email do
5 @shortdoc "Email administrative tasks"
6 @moduledoc File.read!("docs/administration/CLI_tasks/email.md")
8 def run(["test" | args]) do
19 email = Pleroma.Emails.AdminEmail.test_email(options[:to])
20 {:ok, _} = Pleroma.Emails.Mailer.deliver(email)
22 shell_info("Test email has been sent to #{inspect(email.to)} from #{inspect(email.from)}")
25 def run(["resend_confirmation_emails"]) do
28 shell_info("Sending emails to all unconfirmed users")
30 Pleroma.User.Query.build(%{
33 confirmation_pending: true,
36 |> Pleroma.Repo.chunk_stream(500)
37 |> Stream.each(&Pleroma.User.try_send_confirmation_email(&1))