From: lain Date: Tue, 28 Jan 2020 16:42:57 +0000 (+0000) Subject: Merge branch 'features/task-test-email' into 'develop' X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=12b6fcdb8c8c65311d1a13976dfe8d027bdcd168;p=akkoma Merge branch 'features/task-test-email' into 'develop' Create pleroma.email mix task Closes #1061 See merge request pleroma/pleroma!2118 --- 12b6fcdb8c8c65311d1a13976dfe8d027bdcd168 diff --cc lib/pleroma/emails/admin_email.ex index d7dd4b2e0,b3623d3e4..5f23345f7 --- a/lib/pleroma/emails/admin_email.ex +++ b/lib/pleroma/emails/admin_email.ex @@@ -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 = """ +

Instance Test Email

+

A test email was requested. Hello. :)

+ """ + + 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