@@ -29,7 +29,6 @@ defmodule MobilizonWeb.Email.Admin do
|
||||
|> assign(:locale, locale)
|
||||
|> assign(:subject, subject)
|
||||
|> assign(:report, report)
|
||||
|> render("report.html")
|
||||
|> Email.premail()
|
||||
|> render(:report)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -16,15 +16,6 @@ defmodule MobilizonWeb.Email do
|
||||
|> put_header("Reply-To", Config.instance_email_reply_to())
|
||||
|> assign(:instance, instance)
|
||||
|> put_html_layout({MobilizonWeb.EmailView, "email.html"})
|
||||
|> put_text_layout(false)
|
||||
end
|
||||
|
||||
def premail(email) do
|
||||
html = Premailex.to_inline_css(email.html_body)
|
||||
text = Premailex.to_text(email.html_body)
|
||||
|
||||
email
|
||||
|> html_body(html)
|
||||
|> text_body(text)
|
||||
|> put_text_layout({MobilizonWeb.EmailView, "email.text"})
|
||||
end
|
||||
end
|
||||
|
||||
@@ -31,8 +31,7 @@ defmodule MobilizonWeb.Email.User do
|
||||
|> assign(:locale, locale)
|
||||
|> assign(:token, confirmation_token)
|
||||
|> assign(:subject, subject)
|
||||
|> render("registration_confirmation.html")
|
||||
|> Email.premail()
|
||||
|> render(:registration_confirmation)
|
||||
end
|
||||
|
||||
@spec reset_password_email(User.t(), String.t()) :: Bamboo.Email.t()
|
||||
@@ -52,7 +51,6 @@ defmodule MobilizonWeb.Email.User do
|
||||
|> assign(:locale, locale)
|
||||
|> assign(:token, reset_password_token)
|
||||
|> assign(:subject, subject)
|
||||
|> render("password_reset.html")
|
||||
|> Email.premail()
|
||||
|> render(:password_reset)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user