Merge branch 'features/task-test-email' into 'develop'
authorlain <lain@soykaf.club>
Tue, 28 Jan 2020 16:42:57 +0000 (16:42 +0000)
committerlain <lain@soykaf.club>
Tue, 28 Jan 2020 16:42:57 +0000 (16:42 +0000)
Create pleroma.email mix task

Closes #1061

See merge request pleroma/pleroma!2118

1  2 
CHANGELOG.md
lib/pleroma/emails/admin_email.ex

diff --cc CHANGELOG.md
Simple merge
index d7dd4b2e064908ccd91cd937f4a784a2afb33600,b3623d3e4efd94a488230b95c1010f054b5f58e7..5f23345f7b9434ff033d8f6d5092da98fde6815e
@@@ -17,9 -18,22 +18,22 @@@ defmodule Pleroma.Emails.AdminEmail d
    end
  
    defp user_url(user) do
 -    Helpers.feed_url(Pleroma.Web.Endpoint, :feed_redirect, user.id)
 +    Helpers.user_feed_url(Pleroma.Web.Endpoint, :feed_redirect, user.id)
    end
  
+   def test_email(mail_to \\ nil) do
+     html_body = """
+     <h3>Instance Test Email</h3>
+     <p>A test email was requested. Hello. :)</p>
+     """
+     new()
+     |> to(mail_to || Config.get([:instance, :email]))
+     |> from({instance_name(), instance_notify_email()})
+     |> subject("Instance Test Email")
+     |> html_body(html_body)
+   end
    def report(to, reporter, account, statuses, comment) do
      comment_html =
        if comment do