Fix email mix task on OTP releases
authorrinpatch <rinpatch@sdf.org>
Sun, 9 Feb 2020 00:27:29 +0000 (03:27 +0300)
committerrinpatch <rinpatch@sdf.org>
Sun, 9 Feb 2020 00:27:29 +0000 (03:27 +0300)
Closes pleroma#1548

lib/mix/tasks/pleroma/email.ex

index 2c3801429227eed6c7105ee20c4a13eb0121c891..d3fac6ec8f3420da3ec0b765932b49ba432f42e6 100644 (file)
@@ -1,5 +1,6 @@
 defmodule Mix.Tasks.Pleroma.Email do
   use Mix.Task
+  import Mix.Pleroma
 
   @shortdoc "Simple Email test"
   @moduledoc File.read!("docs/administration/CLI_tasks/email.md")
@@ -18,8 +19,6 @@ defmodule Mix.Tasks.Pleroma.Email do
     email = Pleroma.Emails.AdminEmail.test_email(options[:to])
     {:ok, _} = Pleroma.Emails.Mailer.deliver(email)
 
-    Mix.shell().info(
-      "Test email has been sent to #{inspect(email.to)} from #{inspect(email.from)}"
-    )
+    shell_info("Test email has been sent to #{inspect(email.to)} from #{inspect(email.from)}")
   end
 end